Repository navigation
Flatten prepare_src layout and keep today-selected text readable - #95
Merged
Merged
Conversation
cp -R app/assets/stylesheets/ src is non-deterministic across platforms (flat on macOS, nested under src/stylesheets/ on Linux), so a git-installed package built on Linux had its scss at an unexpected path and broke consumers importing src/active_admin_datetimepicker. Copy directory contents (dir/.) into an existing src/ so the layout is flat and consistent everywhere. Also keep the number visible when today is the selected cell: its accent fill now gets light text instead of the accent-coloured today text on an accent background.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes found while integrating the git-pinned package downstream.
1.
prepare_srclayout was platform-dependent.cp -R app/assets/stylesheets/ srccopies the directory flat intosrc/on macOS but nested assrc/stylesheets/on Linux. A package built on Linux (e.g. a consumer pinning a commit via git) therefore puts its stylesheet atsrc/stylesheets/active_admin_datetimepicker.scss, whilemain/styleand every consumer import expectsrc/active_admin_datetimepicker.scss— breakingsasswith "Can't find stylesheet to import". Copy contents (dir/.) into a pre-madesrc/so the layout is flat and identical on every platform.2. Today-as-selected cell hid its number.
td.xdsoft_todaysets the accent as the text colour; when today is also the current/selected cell it gets the accent as its background too, so the number became accent-on-accent (invisible in light mode). Addtd.xdsoft_today.xdsoft_current { color: #fff }so the selected fill keeps light text.Verified the flat layout by running the script on Linux; verified the colour fix against the initialized widget.