v4.5.0 - Dark Mode
4.5.0 (2024-03-05)
Dark Mode ✨
This is probably a UX change that many users will be happy to start using, however there are a few important notes to be aware of as shown below.
- Dark Mode must be enabled via a
darkMode
grid option, it will not auto-detect the color scheme from the browser (you can however easily do it yourself). There are a couple of reasons as to why it was created as a grid option, it's mostly related to the fact that a few features in the lib require the creation of certain DOM Elements that are appended to thebody
(e.g. ColumnPicker, GridMenu, LongTextEditor, CompositeEditorModal, ...) and it requires extra code in place that SlickGrid will take care of it for you but can only work via a grid option, and for that reason it simply cannot be just simple CSS classes. - SVG icon color are using a lighter gray by default, if you're using a Font family for the icons then that won't affect you however keep reading. As mentioned earlier, the SVG icons are using a light gray and that is because the same color must be used for both Light & Dark theme because at the moment the project will create the SVG with a fixed
fillColor
defined in SASS and once it is set, you cannot change it... you might ask, well can that be fixed in the future? The answer is Yes but... I did find that we can convert all SVG to pure CSS (using UnoCSS, by AntFu) approach but that will introduce some breaking changes and considering that I recently released a major version, I will wait couple more months to proceed with another major. Part of the breaking changes will be to drop support for Fonts and keep only SVGs internally in a future major release. - the Dark Mode Theme was created using CSS variables, you might need to tweak some of these variables depending on your primary color, see Slickgrid-Universal CSS variables
- also note that I'm not a Designer, so if you feel that some colors are off then please contribute a PR
- you can see Dark Mode demo in Example 1, Example 7, Example 12 or Example 16. All examples have a Toggle Light/Dark Mode button and Example 1 also has the browser auto-detect Dark Mode on the 1st grid only.
Also worth knowing that I also improved multiple-select-vanilla
by adding a new feature to replace tabIndex
by arrow navigation highlight. This feature will let you use the keyboard (up/down arrows or mouse hover) to navigate the select options and choose any of them (via Enter key) and all of that without losing your current focus (which is a lot better than using tabIndex
). This new feature should be a lot more UX friendly.
This is pretty much completing the roadmap of all the features that I wanted to add to this library, this project started 7 years ago and I added a lot of features over the years.
Bug Fixes
- auto-resize not just grid but also headers for Salesforce tabs (#1395) (6180461) - by @ghiscoding
- common: switch to
isomorphic-dompurify
for SSR support (#1413) (b619453), closes /github.com/ghiscoding/Angular-Slickgrid/discussions/838#discussioncomment-8574215 - by @ghiscoding - core: add extra checks for some objects to be a bit more strict (#1404) (8b95c50) - by @ghiscoding
- plugin: the RowMove plugin cell should be selectable (#1408) (8c01a13) - by @ghiscoding
- styling: add full width to grid container (#1409) (eedc162) - by @ghiscoding
- styling: add menu shadow & increase contrast for Dark Mode (bff2da0) - by @ghiscoding
- styling: ms-select filter should use same color as other filters (#1396) (a30d590) - by @ghiscoding
- styling: ms-select highlight bg-color same as nav highlight (fe77341) - by @ghiscoding-SE
- styling: properly align flexbox ms-select icon+text vertically (#1397) (e744d02) - by @ghiscoding
- styling: remove header menu open class for Dark Mode (6a2e7e1) - by @ghiscoding
- styling: tweak Composite Editor form disabled buttons style (5052ba1) - by @ghiscoding
Features
- common: upgrade
multiple-select-vanilla
to v2 (#1401) (d6bb1d7) - by @ghiscoding - deps: simplify package TS Types exports (#1402) (19bac52) - by @ghiscoding
- editor: add
onRendered
lifecycle callback option (#1410) (9d348d6) - by @ghiscoding - styling: add Dark Mode grid option (#1407) (855151b) - by @ghiscoding