Skip to content
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

Reinstate some default styling (tooltip, fieldsets) #4873

Merged
merged 10 commits into from
Dec 11, 2024

Conversation

sergei-maertens
Copy link
Member

  • Removed the custom tooltip styling to be aligned with default-project again
  • Fixed the checkbox markup in our react components to be consistent with rest of django admin
  • Removed CSS overrides that have been obsoleted now that RJSF has been dropped.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.62%. Comparing base (3e7b959) to head (3bc48aa).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4873   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         757      757           
  Lines       25945    25945           
  Branches     3419     3419           
=======================================
  Hits        25069    25069           
  Misses        613      613           
  Partials      263      263           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robinmolen
Copy link
Contributor

robinmolen commented Dec 4, 2024

I really like the changes (the big red minus and the accessibility improvements 👌)

There are some weird spacing styling issues with the help texts that, in my opinion, should be 'fixed'. Things like:

  • alignment with inputs
  • spacing between fields
  • weird extra space between input and help text

I've added some comments in the chromatic to highlight these items

Edit: this would again add some custom styling code..

@sergei-maertens sergei-maertens force-pushed the a11y/reinstate-default-tooltips branch 3 times, most recently from b86a737 to 21bc4e2 Compare December 9, 2024 21:51
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was... very broken since a long time :) I can't even remember if we had storybook back when we were on Django 3.2

@sergei-maertens sergei-maertens force-pushed the a11y/reinstate-default-tooltips branch 3 times, most recently from 00457c1 to ec75925 Compare December 10, 2024 08:03
@sergei-maertens
Copy link
Member Author

@robinmolen this should now be ready for re-review. Note that I dismissed some valid remarks due to it being the way it is in Django markup/CSS and I'd rather not introduce custom CSS again with all the pain it brings when upgrading Django :/

This aligns the implementation again with default project. The help
text is the only way to specify crucial information/context or
requirements for a given form field, and thus should be visible.

Tooltips serve a different purpose - they can provide additional,
informational, context but may not hide essential information for
accessibility reasons. Unfortunately, the Django admin doesn't have
a mechanism for using both flavours of information.
Left-over from the Django 4.2 upgrade where the HTML was changed.

This ensures the help text is below the checkbox, rather than next to
it with some awkward horizontal space between.
Without wrapping, the delete icon cannot be reached to delete a step
because the step name is pushing it behind the form step details.
This used to be required to deal with styling from rjsf, but that
dependency has been removed so we can stick to the normal Django
styling instead.
The fieldboxes/multiple fields on a row was broken since the Django
4.2 upgrade because the markup changed extensively.

The markup now again matches a vanilla Django admin. Fielboxes are
slightly different since they gain additional wrappers, and the layout
of the errors relative to the input/help text changes.
@sergei-maertens sergei-maertens force-pushed the a11y/reinstate-default-tooltips branch from ec75925 to 3bc48aa Compare December 10, 2024 08:54
Copy link
Contributor

@robinmolen robinmolen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i get your disdain to replace custom styling with other custom styling...

The changes look good to me!

@sergei-maertens sergei-maertens merged commit 1ecc79f into master Dec 11, 2024
34 checks passed
@sergei-maertens sergei-maertens deleted the a11y/reinstate-default-tooltips branch December 11, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants