-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Remove fomantic checkbox module #30162
Conversation
WIP because I noticed this JS needs to be removed/updated:
Also, web_src/js/modules/fomantic/aria.md needs updates. |
Ready now. |
data.append('ids[]', this.getAttribute('data-id')); | ||
for (const checkbox of checkboxes) { | ||
if (checkbox.checked) { | ||
data.append('ids[]', checkbox.closest('.ui.checkbox').getAttribute('data-id')); |
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.
Why did the selector change here from this
to a parent element?
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.
Selector is for .checkbox input
because in the case above it's easier to work directly with input
, but in this case the data-attribute is set on .checkbox
. So I can optimize one case or the other.
Co-authored-by: delvh <[email protected]>
Co-authored-by: delvh <[email protected]>
CSS is pretty slim already and the `.ui.toggle.checkbox` sliders on admin page also still work. The only necessary JS is the one that links `input` and `label` so that it can be toggled via label. All checkboxes except the markdown ones render at `--checkbox-size: 16px` now. <img width="174" alt="Screenshot 2024-03-28 at 22 15 10" src="https://github.com/go-gitea/gitea/assets/115237/3455c1bb-166b-47e4-9847-2d20dd1f04db"> <img width="499" alt="Screenshot 2024-03-28 at 21 00 07" src="https://github.com/go-gitea/gitea/assets/115237/412be2b3-d5a0-478a-b17b-43e6bc12e8ce"> <img width="83" alt="Screenshot 2024-03-28 at 22 14 34" src="https://github.com/go-gitea/gitea/assets/115237/d8c89838-a420-4723-8c49-89405bb39474"> --------- Co-authored-by: delvh <[email protected]>
* upstream/main: Remove fomantic checkbox module (go-gitea#30162) Refactor topic Find functions and add more tests for pagination (go-gitea#30127) replace jquery-minicolors with coloris (go-gitea#30055) Add API for `Variables` (go-gitea#29520) Fix `DEFAULT_SHOW_FULL_NAME=false` has no effect in commit list and commit graph page (go-gitea#30096) Fix migration v292 (go-gitea#30153) Adjust VS Code debug filename match in .gitignore (go-gitea#30158) Prevent re-review and dismiss review actions on closed and merged PRs (go-gitea#30065) Render code tags in commit messages (go-gitea#30146) Bump `@github/relative-time-element` to v4.4.0 (go-gitea#30154) Migrate font-family to tailwind (go-gitea#30118) Move from `max( id )` to `max( index )` for latest commit statuses (go-gitea#30076) Remember login for a month by default (go-gitea#30150)
Backport #30162 by @silverwind CSS is pretty slim already and the `.ui.toggle.checkbox` sliders on admin page also still work. The only necessary JS is the one that links `input` and `label` so that it can be toggled via label. All checkboxes except the markdown ones render at `--checkbox-size: 16px` now. <img width="174" alt="Screenshot 2024-03-28 at 22 15 10" src="https://github.com/go-gitea/gitea/assets/115237/3455c1bb-166b-47e4-9847-2d20dd1f04db"> <img width="499" alt="Screenshot 2024-03-28 at 21 00 07" src="https://github.com/go-gitea/gitea/assets/115237/412be2b3-d5a0-478a-b17b-43e6bc12e8ce"> <img width="83" alt="Screenshot 2024-03-28 at 22 14 34" src="https://github.com/go-gitea/gitea/assets/115237/d8c89838-a420-4723-8c49-89405bb39474"> Co-authored-by: silverwind <[email protected]> Co-authored-by: delvh <[email protected]>
Fix #30185, regression from #30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that.
Fix go-gitea#30185, regression from go-gitea#30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that.
Backport #30195 by @silverwind Fix #30185, regression from #30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that. Co-authored-by: silverwind <[email protected]>
Fix the checkbox issues in #30303 which were existing problems with these selectors, but made visible with #30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: Giteabot <[email protected]>
Fix the checkbox issues in go-gitea#30303 which were existing problems with these selectors, but made visible with go-gitea#30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: Giteabot <[email protected]>
Backport #30308 by @silverwind Fix the checkbox issues in #30303 which were existing problems with these selectors, but made visible with #30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: silverwind <[email protected]>
Fix the checkbox issues in go-gitea#30303 which were existing problems with these selectors, but made visible with go-gitea#30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: Giteabot <[email protected]>
Fix go-gitea/gitea#30185, regression from go-gitea/gitea#30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that. (cherry picked from commit 640850e15f56bbe01f5d8ea407f99c79dc38457e)
Backport #30195 by @silverwind Fix go-gitea/gitea#30185, regression from go-gitea/gitea#30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that. Co-authored-by: silverwind <[email protected]> (cherry picked from commit 9d38c4d60ef5bd015e1430386e38d9f32e050f8f)
Fix the checkbox issues in go-gitea/gitea#30303 which were existing problems with these selectors, but made visible with go-gitea/gitea#30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: Giteabot <[email protected]> (cherry picked from commit 644ade5ae6805a3db063b3f81a596febe49bacaf)
Backport #30308 by @silverwind Fix the checkbox issues in go-gitea/gitea#30303 which were existing problems with these selectors, but made visible with go-gitea/gitea#30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: silverwind <[email protected]> (cherry picked from commit d26ec5f2eb74a6437f998ab0af2ae058a64e06a2)
CSS is pretty slim already and the
.ui.toggle.checkbox
sliders on admin page also still work. The only necessary JS is the one that linksinput
andlabel
so that it can be toggled via label. All checkboxes except the markdown ones render at--checkbox-size: 16px
now.