-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Replace files app ids to classes #33320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
It was considered to use |
|
I don't think "data-*" attributes are adequate for addressing/querying elements, or at least less than classes |
My fear is that are very simple and generic selectors. Maybe we can use prefix to prevent collisions.
|
|
originally I wanted to keep the change minimal, considering that in the long term the file lists will be replaced with Vue components. now, since you mention collisions, and since I already identified the locations to touch in the diff, it wouldn't hurt to use the opportunity to add a namespace. Thanks for bringing it up |
|
I've now renamed "filestable" to "files-filestable" and "fileList" to "files-fileList" |
287c439 to
c1c5b8c
Compare
|
I've reverted the renaming of then I've renamed a bit more manual testing is needed and also more testing with Lighthouse after switching the sections to make sure there is no more duplicate id |
|
c1c5b8c to
5f8ad36
Compare
|
Pytal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that global CSS necessitates the use of the files class namespace even in apps that aren't files like comments and systemtags but that is not a concern for this PR
|
there's a slight risk that CSS rule priorities will change a bit because targetting a class is weaker than an id. |
|
thanks for the reviews. I'm going to check the dependent PRs before merging |
it has its own namespace "picker-fileList" |
Replaced ids to classes for the following: - #filestable -> .files-filestable - #fileList -> .files-fileList - #controls -> .files-controls - #emptycontent -> .emptyfilelist.emptycontent Signed-off-by: Vincent Petry <[email protected]>
3909357 to
bb2557c
Compare
|
text app and activity are green with viewer I'm struggling with CI, so probably I'll skip it and hope it will work with master |
|
Changes: |
Maybe the files_rightclick app? |
ideally apps should never rely on those and should actually use the plugin API to attach themselves to the existing classes, like FileList, then they can access |
|
I've grepped the release tarball: nothing else found! |
Goal was to reduce id duplication due to the fact that file lists are duplicated in DOM for the different sections of the files app.
Based on apps/files/templates/list.php, then searched for all files in the workspace that reference
#$varor'var'or"var":#fileList#filestable#emptycontent#controls#notification<= likely important as it appears in multiple apps/files*/template/list.php filescheck if those appear multiple times
#dir#permissions#select-all-files?probably unnecessary to replace:
#dirToken#free_space#uploadprogresswrapperFurther todos:
NODE_PATH=build/node_modules build/node_modules/karma/bin/karma start tests/karma.config.jsTests: