Skip to content

Prep Tailwind CSS migration part 5#8122

Merged
javierjulio merged 22 commits into
masterfrom
tailwind-part-5
Nov 4, 2023
Merged

Prep Tailwind CSS migration part 5#8122
javierjulio merged 22 commits into
masterfrom
tailwind-part-5

Conversation

@javierjulio

Copy link
Copy Markdown
Member

This completes the style updates for pagination and consolidates to a single kaminari theme. The active_admin_countless theme has been removed as it's no longer needed. The original theme can handle the pagination_total: false case. The layout and styles for Comments have been been mostly completed. Flowbite was updated to v2. Both index-table and direct table_for usage, now apply the same data-table CSS class so they are styled the same.

@javierjulio javierjulio self-assigned this Oct 29, 2023
@codecov

codecov Bot commented Oct 29, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (12c39a7) 99.05% compared to head (1fd2b6a) 99.05%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8122   +/-   ##
=======================================
  Coverage   99.05%   99.05%           
=======================================
  Files         184      184           
  Lines        4740     4745    +5     
=======================================
+ Hits         4695     4700    +5     
  Misses         45       45           
Files Coverage Δ
features/step_definitions/comment_steps.rb 100.00% <100.00%> (ø)
features/step_definitions/pagination_steps.rb 100.00% <ø> (ø)
...ive_record/comments/views/active_admin_comments.rb 100.00% <100.00%> (ø)
...ive_admin/views/components/paginated_collection.rb 100.00% <100.00%> (ø)
lib/active_admin/views/components/table_for.rb 100.00% <100.00%> (ø)
lib/active_admin/views/index_as_table.rb 98.43% <ø> (ø)
lib/active_admin/views/pages/base.rb 100.00% <100.00%> (ø)

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

@javierjulio javierjulio force-pushed the tailwind-part-5 branch 3 times, most recently from c64d12e to 5a9f572 Compare October 31, 2023 21:18
We can remove the active_admin_countless theme since all that did differently was not include the first/last links. With out updated pagination theme, we are no longer using first/last links but just next/previous instead. The outermost first and last page number link will be visible so that is its replacement. With that, that means we can remove this extra theme as its no longer needed.

This also updates the pagination locale text to be shorter, matching modern designs.

The paginated_collection component layout has been updated so the first row contains the paging info and links while the second row has the optional per page selector and download links.
Common layout for this is to always have the comment form first and then the list of comments.
Since table_for can be used directly, and its a component vs just a plain table tag, we want to use the same component class for table_for and index_as_table so they are styled the same. We don't want to apply table styles using a tag selector, nor require users to manually add a class if using table_for directly.
This helps testing a responsive table (horizontally scrollable)
Use some sample lorem sentences to generate random bodies of text for posts and comments. This also bumps the number of each created to help test pagination.
Since we generate an app for local dev in `tmp/development_apps/rails_*` we need to hard code a relative path to the project root. The default value for this is to run `bundle show activeadmin` but that will only work from outside this repo.
This is something Flowbite declared but even before v2 wasn't using in their docs.
We don't want borders on tooltips. The common pattern is its just a solid background color with a shadow. Easier to maintain. Also no need for :after selector on data-popper-arrow as we just need a single psuedo element.
@javierjulio javierjulio merged commit 41c24aa into master Nov 4, 2023
@javierjulio javierjulio deleted the tailwind-part-5 branch November 4, 2023 22:08
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.

1 participant