-
Notifications
You must be signed in to change notification settings - Fork 6
Tailwinds conversions #425
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
base: main
Are you sure you want to change the base?
Conversation
- Replace custom pagination with Pagy bootstrap helper and ensure search filter params persist across pages - Update search ordering to use published_at instead of created_at for topics - Fix password reset page link text expected by tests (Login) and restore test description text - Adjust Searcheable concern year/month scopes to handle blank params safely
…ect and ensure correct ordering for tests
- Ensure state filter respects enums in Searcheable#by_state - Force immediate form submission for month and state selects to avoid stale content in tests
We do not have a surver/privacy policy/terms of use and only registered users can log in, so I removed those links and the card that made it sound like anyone could sign up.
With the old design, we were filtering out archived topics by default.
850fe0c to
a6811e4
Compare
|
I've resolved the conflicts/removed some unnecessary links, still need to fix:
|
This was causing the content of the table to be displayed by default on a green background, making it hard to read.
It wasn't clear to me what it meant when I saw it. Since it is not some kind of code to help idenfity a certain category of topic, I think it is best to remove it to avoid confusion and leave more space for the title.
82f5572 to
5afd19b
Compare
Red is generally displayed for destructive actions, but here we were displaying "Edit" in red and "Archive" in orange. Since we are using orange on the Edit forms elsewhere, I've used orange for the Edit button, gray for Archive, and red for Delete. But orange is also often used to indicate a mildly dangerous action, so I wonder if it should be changed to something less alarming, like blue, purple or green. But editing a Topic can indeed be slightly dangerous if the user makes a mistake, so it could also be argued that orange is appropriate.
I also removed the "Danger Zone" as I thought it was a bit confusing that it showed warnings for a Delete feature that does not exist. If the stakeholders need this feature, they will let us know and we can add it at that point.
Admins can already see that information on the form itself or by clicking on the "View Provider Details" button below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
I've asked Claude to help convert a lot of the repetitive inline styles into Tailwind classes, but there are still many files to cover.
|
The password reset page was completely unstyled. I re-used the same style as we have for the "Send reset instructions" page.
I saw no difference visually or in functionality after removing this code.
The password visibility toggle was displayed far to the right of the screen instead of in the password input field because the parent div was not the password field, but also contained the label.
dmitrytrager
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try to keep out view clean as much as possible
| } | ||
|
|
||
| disconnect() { | ||
| window.removeEventListener("scroll", this.handleNavbarScroll); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to remove other listeners on disconnect?
| <%= f.text_field :name, | ||
| placeholder: "Enter language name (e.g., English, Spanish, French)", | ||
| class: "input-field bg-gray-50" %> | ||
| <p class="mt-2 text-xs text-gray-500 m-0">This will be used to identify the language throughout the system.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see different sets of classes for p, div and other tags. Are they all different?
I mean this one, for example, mt-2 text-xs text-gray-500 m-0 appears multiple times.
Can we extract set into our single css class? Is it a good practice with css?
| </td> | ||
| <td class="table-cell text-right"> | ||
| <div class="flex gap-2 justify-end"> | ||
| <%= link_to edit_language_path(language), class: "btn-edit" do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's extract heavy html code like this (with svg, path) into partial and just reuse it.
Also consider using gems like this for inline svg
| color: #ef4444; | ||
| } | ||
|
|
||
| .text-blue-600 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract css out of layouts?
|
|
||
| <script> | ||
| // Enhanced form interactions | ||
| document.addEventListener('DOMContentLoaded', function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract scripts like this into separate js files and just load it there?
| <% end %> | ||
| </div> | ||
|
|
||
| <!-- Breadcrumb --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is worth moving into partials. We can find a way to paramaterize breadcrumbs
| </div> | ||
|
|
||
| <!-- Success Message --> | ||
| <% if notice %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved into partial as well. I can see notices rendering inside different views
| </div> | ||
| <% end %> | ||
|
|
||
| <% if flash[:notice] %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And while moving into partials, we can generalise it to working with list of notices
| <% end %> | ||
| </td> | ||
| </tr> | ||
| <% if @tags.any? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we use enumerator on the next line .any? may be redundant here. It makes sense when we have else condition
| <div class="relative"> | ||
| <%= f.select :order, | ||
| options_for_select([ | ||
| ["Name", :name], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we hardcode these options somewhere else (not inside view file)?

WIP