Problem/Motivation
The code and comments in the Settings Tray module inconsistently uses "Off Canvas" as 2 words and 1 word.
This was added to #2784443: Move off-canvas functionality from Settings tray module into drupal.dialog.ajax library so that other modules can use it but it makes sense to do this a separate issue
Proposed resolution
Change all occurrences of offcanvas to 2 words Off Canvas under /core/modules/outside_in, i.e there should be no examples of "offcanvas" or "Offcanvas" in this folder anywhere.
For example
*.js and *.css file names
from offcanvas.* to off-canvas
CSS ids and class names
offcanvas to off-canvas
outside_in.services.yml
offcanvas to off_canvas
php variable names with underscores
From offcanvas to off_canvas
php variable names with camelcase
From Offcanvas to OffCanvas
To see the previous see the previous attempt to do this see this diff file: https://www.drupal.org/files/issues/interdiff-24-28_6.txt
Remaining tasks
do it
User interface changes
None
API changes
None
Data model changes
none
| Comment | File | Size | Author |
|---|---|---|---|
| #46 | 2862625-46.patch | 44.83 KB | tedbow |
| #43 | 2862625-43.patch | 44.3 KB | tedbow |
| #43 | interdiff-39_reroll-43.txt | 5.8 KB | tedbow |
| #39 | 2862625-39.patch | 43.91 KB | tedbow |
| #35 | 2862625-35-Rename_offcanvas_variables.patch | 42.31 KB | selvira |
Comments
Comment #2
tedbowComment #3
selvira commentedI'm going to work in this issue.
Greetings.
Comment #4
selvira commentedHere you are the patch with the whole variables changed, I hope it'll be enough.
greetings!.
Comment #6
selvira commentedOk, I'll try a second chance with my test succeeded .
Regards
Comment #8
selvira commentedComment #10
selvira commentedIt's seems like I have a problem with drupal standard coding but I not modify those!! jeje I suppose that the tests are not working very well.
Tomorrow I'll check again about that..
Please @tedbow confirm me that everything is as you expected.
Many thanks in advance!.
Greetings.
Comment #11
tedbow@MaxFire thanks for working on this. You may not have introduced the standards violations. They have existed before.
When do the git diff are you using "-M" option? This will detect that files are renamed from for example "offcanvas.js" to "off-canvas.js" instead of thinking it is new file(hopefully). This will make patch smaller and will include lines.
I do something like
git diff -M 8.4.x > ../filename.patchComment #12
selvira commentedHi!,
Thanks for everything, you're completely right about that yay!.
I just add the patch again with that changes, thanks again, I hope this
Greetings.
Comment #14
tedbow@Maxfire awesome work a couple more changes that need to make the test pass.
This is the html id attribute and should be #drupal-off-canvas.
It is causing a test to fail.
The test module directory and file names should be update to match namespace, off_canvas_test.
info, routing, etc files
This cause the test not to find off_canvas_test module
Comment #15
gaurav.kapoor commentedFixed 14.1
Comment #17
selvira commentedComment #19
selvira commentedThanks Tedbow! jeje I changed everything as you say, i don't know what happen now...
Tomorrow i hope to finish the issue.
Thanks again for your help!
Comment #20
selvira commentedComment #22
selvira commentedComment #24
nesta_ commentedComment #25
selvira commentedComment #27
selvira commentedComment #28
tedbow@Maxfire awesome work!!! Tests pass and I just checked and there are no occurrences of "offcanvas" or "Offcanvas" in the files and no files name "offcanvas" lower case.
Looking at it further....
Comment #29
GrandmaGlassesRopeManThis should be
* CSS for off-canvas dialogIn general I think we want to move away from using
tray. Additionally in the comments, unless it comes first (just capitalize off) it should beoff-canvas dialog..Comment #30
GrandmaGlassesRopeManComment #31
selvira commentedI just modify the comments just in "off-canvas dialog" case and the appreciation of @drpal also, thanks a lot for that!.
Greetings.
Comment #32
tedbow@Maxfire thanks for the updates
Uploading an interdiff between 27 and 31
Found some other variations in the comments still
These should all also be changed to "off-canvas dialog"
Just to be clear only the comments now are an issue. I think code and file names are perfect.
Sorry we were so inconsistent when creating this module :(
Also removing novice tag, tricky probably than we thought ;)
Comment #33
selvira commentedDon't worry about that, I copy that, here you are the new patch.
Thanks!.
Comment #34
tedbowAlmost there! Just a few more changes.
Change "off_canvas dialog" to "off-canvas dialog"
Typo, "off_canvas fialog" should be "off-canvas dialog"
Comment #35
selvira commentedOks, I got it.
Here you are the patch updated.
Greetings.
Comment #36
GrandmaGlassesRopeMan@Maxfire
I think this is looking good. Probably another set of eyes to make sure we didn't miss anything is appropriate.
Comment #37
selvira commentedThanks for your advise @drpal, I just unassign this issue.
Greetings!.
Comment #38
tedbowJust needs a re-roll.
Comment #39
tedbowRe-roll
Comment #40
tedbowComment #41
GrandmaGlassesRopeManComment #42
lauriiiThis change should be reverted
Is there a particular reason why it is off_canvas instead of off-canvas on the url?
Comment #43
tedbow@lauriii thanks for taking a look this issue.
re #42
1. fixed
2. Nice catch! That was problem with the search/replace probably for "offcanvas/off_canvas". Fixed
I also found 1 other case in outside_in.routing.yml where we were using off_canvas in a path where we didn't need to be. Fixed that too.
Comment #44
GrandmaGlassesRopeManComment #46
tedbowAnother re-roll
Comment #47
GrandmaGlassesRopeManComment #48
jrockowitz commentedI just tested this patch with #2866554: Add Quick Edit off canvas form. and the renaming works exactly as expected with some minor and predictable tweaks to the Webform off-canvas integration.
I am hoping at DrupalCon to be able to demo the Webform module's system tray integration.
I know the outside_in.module is still experimental, I just want to get more people inspired to experiment.
Comment #49
alexpottCommitted and pushed a614ec6 to 8.4.x and fb9bacc to 8.3.x. Thanks!
Backported to 8.3.x because settings tray is experimental.
Comment #52
tedbowChanging to new settings_tray.module component. @drpal thanks for script help! :)