Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
From https://www.drupal.org/project/drupal/issues/3111409#comment-13841374
JS documentation and comments need to adhere to https://www.drupal.org/docs/develop/standards/javascript/javascript-api-...
Comment | File | Size | Author |
---|---|---|---|
#50 | 3173832-50.patch | 11.87 KB | paulocs |
#50 | interdiff-47-50.txt | 2.87 KB | paulocs |
#47 | interdiff-46-47.txt | 4.08 KB | mherchel |
#47 | 3173832-47.patch | 11.18 KB | mherchel |
#46 | 3173832-46-reroll.patch | 10.07 KB | mherchel |
Issue fork drupal-3173832
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedHi,
I am creating patch for the issue.
Please review the patch.
Let me know if any recommendations.
Thanks.
Comment #3
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #4
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #5
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #6
mherchelThanks for the work! There's a number of issues with the patch. We need to fix indentation issues, and be more descriptive on almost all of the comments.
All of these comments are very ambiguous. for each of these, we need to document what the file or function does. "Theme for comments" doesn't accomplish this.
Debug.es6.js is being removed from the core patch. We don't need to modify this.
I'm confused. We're not attaching table drag.
Needs to be more descriptive.
I don't think this is valid for eslint.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Why the change in indentation?
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Needs to be more descriptive.
Why the change in indentation?
e is an event object.
Why change of indentation?
Needs to be more descriptive.
Comment #7
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #8
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #9
nod_Latest patch adds tabs, and dosen't apply cleanly on my end
For the behaviors comments, there needs to be a little more precision, mainly the @type of the behavior.xxx object, and the type of the attach function, like this:
Comment #10
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #11
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #12
nod_Patch still doesn't apply, comments for behaviors are not using the core standards. See #9
can you make sure
git apply your-patch.patch
works before sending a new patch? thanks. Latest patch fail to apply on:Comment #13
mherchelComment #14
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedComment #15
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedComment #16
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedHi,
Providing updated patch.
Please review the patch.
Thanks.
Comment #17
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #18
mherchelThere's a lot of unrelated changes besides comment in this patch. Please only modify the comments. Also, please test your patches before submitting them.
Comment #19
markdorisonRe-rolled the patch to apply cleanly and made my best effort to remove non-comment-related changes as mentioned in #18
I am guessing this will still need work but marking as needs review so it will be tested.
Comment #20
mherchelThere's also a lot of improper grammar in the previous patch. And there are a number of things that do not make sense in context such as "Monitoring navigation position as per using root margin."
Honestly the whole patch needs work to be useful to future devs. We need to be sure the comments make sense, and use proper grammar.
Comment #21
KapilV CreditAttribution: KapilV as a volunteer and commentedComment #22
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Association commentedComment #23
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Association commentedComment #24
KapilV CreditAttribution: KapilV as a volunteer and at Innoraft for Drupal Association commentedComment #25
mherchelThere's still a lot of bad grammar within the comments. We need to use proper grammar, and also be sure to not remove the end of file line break.
Comment #26
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedI'm not a front-end developer, so I took some educated guesses at what some of the code was doing. I'm sure someone better versed in the code could add more detailed descriptions, but I'm not sure that is needed. What that in mind, I simplified some of the method descriptions to focus more on what/why vs the how.
Patch #23 seemed to be reverting some changes we wanted, so I started from #19. Happy to reincorporate any wanted changes though.
Comment #27
mherchelThanks for the work on this. I'm attaching some comments!
The function doesn't return anything. It adds the show/hide functionality to the comments.
This doesn't change based on layouts. It shows and hides the desktop nav based on scroll position and controls the functionality of the button that shows/hides the nav.
It might be good to elaborate on what visibility is (it is the state where we want the search form to go to)
This should be elaborated on.
This comment doesn't make sense. It returns false if the mobile tabs trigger button isn't visible, and true if it is.
This is an event object
Do we need this?
Comment #28
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedI'll take another pass at this today.
Comment #29
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedComment #30
mherchelThanks! I went through and made some changes to clear things up.
Comment #31
sulfikar_s CreditAttribution: sulfikar_s at Zyxware Technologies commentedHi, I've applied patch on #30 and it gets applied, but it shows some errors like below.
Also found that Patch includes a modification to the interdiff file (interdiff-29-30.txt) !!!
Please work on this.
Comment #32
kostyashupenkoRerolled + excluded interdiff-29-30.txt from patch file
Also added 2 strings to pass
lint:core-js
script ==>>>Comment #33
kostyashupenkoComment #35
andy-blumNeeds a re-roll
Comment #36
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commented#32 Patch Failed,
#36 Recreated patch, Please review the patch
Comment #37
paulocsAdding new patch, because #36 failed to apply.
Comment #38
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedPlease review.
I mistyped interdiff as .patch file. Ignore that
Comment #39
paulocsComment #40
lauriiiExtra space here.
Nit: line over 80 characters.
Nit: we can remove "seem to" from here.
This comment is probably redundant because next line from here makes it pretty obvious that this sets up monitoring for nav position.
After the first line there should be empty line. There are many docblocks in this file with this violation.
Comment #41
nod_saw a few other things, patch comming.
Comment #42
nod_I thought we had some eslint rules to check documentation format. in any case spotted a few more things.
missed #3 from lauriii post, todo
Comment #43
mherchel#42 looks perfect. Thanks everyone!
Comment #44
lauriiiSorry, here's few more nitpicks 😅 Probably could have fixed on commit but I wasn't sure about .1 and .3.
This should be a sentence and end in a full stop.
Nit: double space between "the" and "header".
What does the slide-out mean here? Could we make it into a full sentence?
Comment #45
Sakthivel M CreditAttribution: Sakthivel M at QED42 for Drupal India Association commentedProviding updated version of patch #45 as per comment #44, Please review the patch
Comment #46
mherchel@Sakthivel M Thanks for the patch, but next time please provide an interdiff so we can see exactly whats changed.
Re-roll of 42 attached.
Comment #47
mherchelMade a number of little nit-picky changes (see interdiff) including re-doing those from #44/#45
Comment #48
bnjmnmThis is looking really good. I spotted a few other little nits:
Something a little more generic here means you won't have to rewrite it if additional checkbox related functionality is added in this file.
The @file annotation could benefit from being more generalized so it doesn't need to change if the file adds functionality not specific to show/hide of nested comments.
An unnecessary "the" here.
The closeMessage function doc could use an "a" after "Adds".
This describes one function within this file, not the contents of the overall file.
This needs the whole
thing.
{Element}
?function stickyHeaderIsEnabled()
Needs docsSimilar to other files, could be good to make this more generic so it remains accurate even if the functionality provided in this file expands.
Comment #49
paulocsComment #50
paulocsI addressed what @bnjmnm pointed in #48.
I tried to write a more generic file documentation but I'm not sure if it looks good.
Comment #51
mherchel#50 looks great. Thanks for working on the patch!
Comment #52
nod_Looking good, RTBC+1
Comment #55
lauriiiOpened #3222313: Rename scripts.js to something more descriptive as a follow-up.
Committed f0a97d0 and pushed to 9.3.x. Also cherry-picked to 9.2.x because this changes documentation only, and Olivero is experimental. Thanks!