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

Rewrite using modern dependencies + dark theme + fixes #49

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tnajdek
Copy link
Member

@tnajdek tnajdek commented May 31, 2024

Summary of Changes:

  • Rewrote the codebase to avoid using unmaintained dependencies, improving readability and maintainability.
  • Added support for dark theme. Closes Consider adding support for dark mode #48.
  • Fixed positioning issue when there are few results. Closes Bad popup positioning when not enough results #47.
  • Implemented accessibility fixes to ensure everything is keyboard accessible.
  • Moved search logic to a worker for a more responsive UI.
  • Made style tooltips more efficient.
  • Dropped support for IE11 and Safari < 10, significantly reducing bundle size.

I tested this in Zotero to ensure correct dark/light mode matching. Also tested in older browsers (Safari 10, Edge 18), performance is obviously worse than in modern browsers, but acceptable and with good UI feedback.

Visually, there are some minor changes to make dark mode work. Colors are appropriated from Zotero theme. Despite this being a rewrite, produced DOM structure is very similar to what we had, except for accessibility fixes. Search logic is pretty-much untouched.

* Switch from vidom to preact
* Switch from tether-drop to floating-ui
* Fix positioning issue when not many results
* Move searching logic to a worker for even more responsive UI
* More efficient style tooltips
* Drop support for IE11 & Safari < 10.1
* Reduce bundle size
Also add aria-pressed attribute to signal that these are toggle buttons.
* Hide items instead of removing
* Avoid re-rendering constant part of the StyleItem
* Remove input debounce when user pastes value or clicks "Link"
* Improve visual feedback while searching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Consider adding support for dark mode Bad popup positioning when not enough results
1 participant