Skip to content

Small Feature: debugbar link - #3070

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

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

Conversation

@enix-app

@enix-appenix-app commented Jun 6, 2020

Copy link
Copy Markdown
Contributor

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

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]

@MGatnerMGatner left a comment

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.

Provide description and style code.

@enix-app

enix-app commented Jun 6, 2020

Copy link
Copy Markdown
ContributorAuthor

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 MGatnerJune 12, 2020 12:49
@enix-app

enix-app commented Jun 12, 2020

Copy link
Copy Markdown
ContributorAuthor

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

@MGatnerMGatner left a comment

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.

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 MGatnerJune 12, 2020 13:35
@enix-app

Copy link
Copy Markdown
ContributorAuthor

OOT:

I can't login/register to forum website.

@MGatner

Copy link
Copy Markdown
Member

Looks great, thank you!

@MGatner
MGatner merged commit 3c05f34 into codeigniter4:developJun 13, 2020
@totoprayogo1916totoprayogo1916 mentioned this pull request Nov 10, 2020
5 tasks
@kenjiskenjis added the enhancement PRs that improve existing functionalities label Mar 22, 2023
@kenjis

Copy link
Copy Markdown
Member

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

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

Labels

enhancementPRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@enix-app@MGatner@lonnieezell@kenjis