Skip to content

Small Feature: debugbar link#3070

Merged
MGatner merged 1 commit intocodeigniter4:developfrom
enix-app:debugbar-route-link
Jun 13, 2020
Merged

Small Feature: debugbar link#3070
MGatner merged 1 commit intocodeigniter4:developfrom
enix-app:debugbar-route-link

Conversation

@enix-app
Copy link
Copy Markdown
Contributor

@enix-app enix-app commented Jun 6, 2020

I think this useful when we would test or check an URI by click the link without write or copy/paste to address bar. Only GET method.
Support custom placeholder.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner
Copy link
Copy Markdown
Member

MGatner commented Jun 6, 2020

This looks pretty cool but I’m not entirely sure from the video what is happening. It turns the route rows into usable and editable links? Please provide a description along with the code, if you would.

Also I don’t think we have formatting correction for JavaScript but please make sure it adheres to the style guide: if(input[n] should have a space if (input[n]

Copy link
Copy Markdown
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provide description and style code.

@enix-app
Copy link
Copy Markdown
Contributor Author

enix-app commented Jun 6, 2020

Preview GIF

Here, sample routes:

$routes->get('/', 'Home::index');
$routes->get('/test', 'Home::index');
$routes->get('/test/(:num)', 'Home::index');
$routes->add('/test/(:num)/(:any)', 'Home::index');
$routes->get('/test/page-(:num)/(:any)', 'Home::index');
$routes->add('/test/page-(:num)/(:any).html', 'Home::index');

Peek 2020-06-07 03-05

@lonnieezell
Copy link
Copy Markdown
Member

It took me a couple of minutes of before I took to this one, but I do kindof dig this feature. @enix-app if you can fix the style tweaks that MGatner asked, we'll merge.

@enix-app enix-app requested a review from MGatner June 12, 2020 12:49
@enix-app
Copy link
Copy Markdown
Contributor Author

enix-app commented Jun 12, 2020

@lonnieezell & @MGatner , I modified it, tested on old browser IE11.

Copy link
Copy Markdown
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the spaces after if statements. I know it is nitpicking but if they don’t align with the style now then nobody is going to bother to change them later.

if (input[n].value.length > 0) inputArray.push(input[n].value);
}

if(inputArray.length > 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (inputArray.length > 0) {


for (var i = 0; i < rowGet.length; i++) {
row = rowGet[i];
if(!/\/\(.+?\)/.test(rowGet[i].innerText)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!/\/\(.+?\)/.test(rowGet[i].innerText)) {

@enix-app enix-app requested a review from MGatner June 12, 2020 13:35
@enix-app
Copy link
Copy Markdown
Contributor Author

OOT:

I can't login/register to forum website.

@MGatner
Copy link
Copy Markdown
Member

MGatner commented Jun 13, 2020

Looks great, thank you!

@MGatner MGatner merged commit 3c05f34 into codeigniter4:develop Jun 13, 2020
@totoprayogo1916 totoprayogo1916 mentioned this pull request Nov 10, 2020
5 tasks
@kenjis kenjis added the enhancement PRs that improve existing functionalities label Mar 22, 2023
@kenjis
Copy link
Copy Markdown
Member

kenjis commented Mar 22, 2023

I'm not sure why, but this does not work now.
See #7324 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants