Problem/Motivation
Route title capitalization is inconsistent.
Let's standardize.
Route titles should be capitalized according to heirarchy.
For instance, the top-level route "Form API Examples" should be fully capitalized, but child paths should be capitalized on the first word and then lower-case, like "Simple form"
Proposed resolution
Look at the *.routing.yml
file for each module.
Each route has a title:
attribute.
For top-level routes, such as 'examples/fapi-example', the title should be fully capitalized.
For child routes, such as 'examples/fapi-example/simple-form', the first word should be capitalized, but not the rest.
Then do the same for the *.links.menu.yml files, so the link titles are the same as the route titles.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#16 | interdiff.txt | 2.18 KB | Mile23 |
#16 | 2897630_15.patch | 20.23 KB | Mile23 |
| |||
#12 | interdiff.txt | 10.91 KB | MaskyS |
#12 | Capitalise_all_route_path_names-2897630-12.patch | 18.4 KB | MaskyS |
| |||
#9 | form api examples.png | 98.91 KB | navneet0693 |
Comments
Comment #2
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedWorking on it.
Comment #3
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedHere we go with patch. Thanks.
Comment #5
LauraRocksThe patch failed one test which was testing the title in fapi_example -module (MultistepFormTest.php). This is a reroll of the patch with one additional change to that file so that the tests pass. I am working in DD&I contrib team together with mentor @zenlan
Comment #6
LauraRocksComment #7
zenlan CreditAttribution: zenlan as a volunteer commentedApplied patch locally, test passed and route titles conform as per the proposed resolution.
Comment #8
Mile23Thanks for the patch, and thanks for the review.
This looks like a good start.
The thing is, if you install the modules their route names still appear in all-caps in the menu bar. That's because we have to change them in the
*.links.menu.yml
file, too.If you look at the fapi_example in particular, it's easy to see all the places that haven't been changed. If you look at
examples/fapi-example
in your browser, you'll see that the links in the template are also all-caps. That's the template infapi_example/templates/description.html.twig
.It seems like there would be a way to specify the route name as the anchor text within twig so you can just specify that you want a link to a route without having to specify its name, but I haven't been able to find that.
Thanks!
Comment #9
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commented@Mile23 I am quite confused here. So, I am attaching the screenshot of browser page of
examples/fapi-examples
I couldn't see the links in all-caps.Please help us with little more description.
Comment #10
MaskyS CreditAttribution: MaskyS at Google Code-In commentedWill work on this. @navneet I think he means in the menu bar, not the links.
EDIT: Upon closer inspection, he is presumably referring to the fact that all the first letters are in caps in the links.
Comment #11
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commented@Kifah Same behavior for menu bar also.
EDIT upon ur EDIT:
Yes, that's why just for getting clear, I left out a comment for him ;-)
Comment #12
MaskyS CreditAttribution: MaskyS at Google Code-In commentedAlright, fixed the names in
*routing.yml
as well as*.links.*.yml
as well as *.html.twig
as per OP and #8.Comment #13
MaskyS CreditAttribution: MaskyS at Google Code-In commentedComment #14
Mile23The list in #9 is not generated by the links page. It's generated by the twig template.
But let's just work on route and link files for now.
Edit:
Oh, I see that #12 did some of that template work. We'll leave that in. :-)
Comment #15
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commentedApologies for confusion this seems a good patch! nice work @Kifah
Comment #16
Mile23Found a few more.
Comment #18
Mile23And done. Thanks everyone!
Comment #19
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commentedEDIT: You are way faster, i was double checking the patch this time :-P
Comment #20
navneet0693 CreditAttribution: navneet0693 as a volunteer and at QED42 commentedOOOOps, I am really sorry.
Comment #21
Mile23No worries. :-)