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

Improve scaffold views #452

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

patriciomacadden
Copy link
Contributor

I made a few modifications to the scaffold views. I'm attaching some images to showcase the before/after of these changes. The changes:

  • remove the mx-auto to most of the views. It makes the scaffold weird as you have to re-focus your sight on every new page. Keep the w-2/3 so the content always starts in the same place.
  • add titles to all pages (show page never had a title IIRC). I think this is nice to keep consistency.
  • add content_for :title to all pages as it was only present in the index view
  • add a hover state to buttons and links and adjust the padding
  • add semantic colors to buttons (just the destroy one, made it red).
  • add an empty state when the list has no items
  • change the border/focus colors on errored fields
  • improve the errors list
  • fixed minor indentations and removed some empty spaces on generated views

I think these are nice changes/additions. Let me know if you agree. I intend to keep contributing these kind of changes if it's something people like.

Before and after pictures:

before after
new-session new-session
new-password new-password
edit-password edit-password
index-users index-users
show-user show-user
edit-user edit-user
edit-user-with-errors edit-user-with-errors
new-user new-user
new-user-with-errors new-user-with-errors

button states:

normal hover
btn-primary btn-primary-hover
btn btn-hover
btn-danger btn-danger-hover
forgot-password forgot-password-hover

@flavorjones
Copy link
Member

I love it, this is a big improvement.

If you want to continue contributing scaffold improvements, it would be very welcome!

@flavorjones flavorjones merged commit c2b3abf into rails:main Jan 10, 2025
17 checks passed
@flavorjones
Copy link
Member

@patriciomacadden
Copy link
Contributor Author

thanks @flavorjones! Definitively will be contributing more stuff!

@patriciomacadden patriciomacadden deleted the improve-scaffold-views branch February 12, 2025 14:34
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.

None yet

2 participants