-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Changelog page that pulls from Github Release notes #867
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,25 @@ | |
<div class="space-y-4"> | ||
<h1 class="text-gray-900 text-xl font-medium mb-4">What's New</h1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know other spots in the codebase are still lacking this, but we should probably include an i18n There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I updated it! |
||
<div class="bg-white shadow-xs border border-alpha-black-25 rounded-xl p-4"> | ||
<div class="flex justify-center items-center py-20"> | ||
<p class="text-gray-500">Changelog coming soon...</p> | ||
</div> | ||
<% @releases_notes.each do |release_notes| %> | ||
<div class="flex justify-between gap-4 releases-notes-row"> | ||
<div class="w-1/3"> | ||
<div class="px-3 flex items-center gap-3"> | ||
<div class="text-white shrink-0 w-9 h-9"> | ||
<%= image_tag release_notes[:avatar], class: "rounded-full w-full h-full object-cover" %> | ||
</div> | ||
<div> | ||
<div class="text-gray-900 font-medium text-sm"><%= release_notes[:name] %></div> | ||
<div class="text-gray-500 text-sm"><%= release_notes[:published_at].strftime("%B %d, %Y") %></div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="w-2/3 releases-notes-details"> | ||
<h1 class="mb-5 text-xl text-gray-900"><%= release_notes[:name] %></h1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small nitpick here, but we should probably change to an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've changed it to an h2 to avoid duplicate H1s on the page! |
||
<%= release_notes[:body].html_safe %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
<div class="flex justify-between gap-4"> | ||
<%= previous_setting("Imports", imports_path) %> | ||
|
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.
Definitely a tricky one here. I think this is a good opportunity for us to evaluate the usage of typography within the app.
Ideally, I think what we should probably consider here is an API like so:
We have
prose
as the "base" styling mechanism, and thenprose--github-release-notes
as a "specialization" where we can add styles for things like.user-mention
,.octicon
, and.dropdown-caret
which don't exist anywhere else.That way, in
tailwind.config.js
, we can do all of our "base" prose overrides:And then in our global Tailwind CSS file, we can apply the "specializations":
So in summary, the changes required here would be:
.prose
class in Tailwind CSS file (it's not being used anywhere).prose--github-release-notes
and all the "specializations" to the Tailwind CSS filetailwind.config.js
.release-notes-row
, etc.)Let me know what you think!
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.
@mattia-malnis for those "base" prose styles for the Tailwind Config file, I worked with @justinfar to standardize this a bit and included it in the updated design file:
https://www.figma.com/design/lonJmVk3HYkwZoIO7xYP2w/Maybe-App-(Community)?node-id=3789-202&t=UY4qtUbF3hRvnpp1-0
Please note—this is an example that we should try to be as "generic" as possible with when applying to those "base" styles in the Tailwind config. These "base" styles should work with any HTML we need to render.
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.
@zachgoll your solution is definitely better, I didn't know about this possibility with Tailwind! I reviewed the code, let me know if everything is ok