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

Update templates and dark mode styles #8187

Merged
merged 13 commits into from
Dec 28, 2023
Merged

Update templates and dark mode styles #8187

merged 13 commits into from
Dec 28, 2023

Commits on Dec 27, 2023

  1. Update main navigation layout

    This is a work in progress.
    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    605dbad View commit details
    Browse the repository at this point in the history
  2. Inline body styles

    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    0a05cf1 View commit details
    Browse the repository at this point in the history
  3. Update comments admin resource index table

    This adds some min widths and truncates the comment body.
    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    ab639f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5907a17 View commit details
    Browse the repository at this point in the history
  5. Update pagination styles for dark mode

    We were setting default background color but its not needed since we prefer to take on the inherited background color and just apply an explicit background color on hover.
    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    2098926 View commit details
    Browse the repository at this point in the history
  6. Delete pagination first/last page partials

    Since these are not used by the paginator we can safely delete these. Forgot to do so when combining the two original themes we had (active_admin and active_admin_countless) for a simpler, modern pagination layout.
    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    8b48005 View commit details
    Browse the repository at this point in the history
  7. Refactor breadcrumbs with link_to html_options

    This way we can style the default breadcrumbs from the view with Tailwind classes. If providing custom breadcrumb, since full links are given, caller should provide any classes for styling. This improves colors for light and dark modes.
    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    3986137 View commit details
    Browse the repository at this point in the history
  8. Update dark mode styles

    Still some elements to update with better dark mode styles but this gets most of the contents on the page.
    
    Updated the main navigation layout and hover/selected states.
    
    Updated the data-table and attributes-table styles, not just dark mode but spacing, borders and other styles.
    
    Imrpoved the empty-value style for all modes too.
    javierjulio committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    91d7e14 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2023

  1. Fix main navigation positioning

    The content was going off screen due to h-screen usage. This was fine originally since we had the menu always be full screen vertically but we've changed that now so have to adjust the top offset based on breakpoint.
    javierjulio committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    3dacaa7 View commit details
    Browse the repository at this point in the history
  2. Use add_class for default so Tailwind finds it

    Otherwise these styles are purged which we don't want.
    javierjulio committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    be7a5d5 View commit details
    Browse the repository at this point in the history
  3. Update status tag styles

    Use whitespace nowrap so multi word status tags don't wrap in a table. Use pill shaped badges instead. No need to duplicate styles here since the second selector is just for updating the color based on the data attribute.
    javierjulio committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    9b7ddf8 View commit details
    Browse the repository at this point in the history
  4. Use NPM package for Tailwind plugin

    This will be required for now with cssbundling-rails. Another option is to copy and paste the plugin.js file to the host app and run it and it will work. That could be an option for tailwindcss-rails users. At the moment there isn't another alternative. I've tried requiring the plugin from the gem path but it doens't seem that Tailwind can find its own modules if required that way. It has to be local.
    javierjulio committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    c718b4c View commit details
    Browse the repository at this point in the history
  5. Consolidate html head partials to one partial

    Originally, we needed this as we didn't extract other views in the layout to partials. No need for specific partials now since chances are if someone wants to edit this, they will want to edit most of the HTML head anyway so easier to extract a single partial with everything already there as its not that many lines.
    
    Since we've improved many of the layout helpers, we'll just inline the title tag now and not sanitize since this is commonly extracted, its much easier now for users to add that in if they want it. We added sanitized due to testing the site title with a link but we've since changed that so the site title really should just be plain text for situations like this. The link was used because often it doubled as the site title in the site header HTML but that is expected to be fully customized and branded now.
    javierjulio committed Dec 28, 2023
    Configuration menu
    Copy the full SHA
    ccba7c6 View commit details
    Browse the repository at this point in the history