-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
📅 Calendar view #2878
base: main
Are you sure you want to change the base?
📅 Calendar view #2878
Conversation
based on avo-hq#2727
created_at by default. can be set to any datetime attribute
Code Climate has analyzed commit 8d6b57e and detected 0 issues on this pull request. View more on Code Climate. |
this way it will be easier to add duration with "ends_at"
currently avo resets view filter when navigating back. we can persist it for calendar and other views. we can also consider persisting other params
if no title is set, defaults to ID
not just select an attribute. defaults to created_at time
@gooroodev review |
Thanks for the call-out, @admsev!
Summary of Proposed Changes
Identified Issues
Issue 1ID: 1 Explanation: Code: <div id="records_panel mt-6"> Fix: <div id="records_panel" class="mt-6"> Explanation: Issue 2ID: 2 Explanation: Code: <p class="font-bold text-xl">
<%= date.strftime('%B %Y') %>
</p> Fix: <p class="font-bold text-xl">
<%= l(date, format: :calendar_header) %>
</p> Explanation: Issue 3ID: 3 Explanation: Code: <% Date::ABBR_DAYNAMES.rotate.each do |day| %> Fix: <% Date::ABBR_DAYNAMES.each do |day| %> Explanation: Issue 4ID: 4 Explanation: Code: <div class="border border-gray-100 px-0.5 min-h-24 <%= today_class(day) %>"> Fix: <div class="calendar-day <%= today_class(day) %>"> Explanation: General ReviewThe code quality and style are generally good, but there are a few areas that could be improved for better readability and maintainability. Specifically, consider using localization for date formats and avoid inline CSS classes. Additionally, ensure that all HTML attributes are properly formatted to avoid rendering issues. -- |
Oups |
heyyyy |
Questions:
|
avo-calendar.mp4 |
Demo
<-
->
#show
page redirects to the correct calendar pageToday
opens current monthDescription
Calendar view. Based on #2727
Monthly calendar currently implemented. We can consider other resolutions in the future.
Records are displayed in calendar by default by
created_at
, but this can be overriden in the resource withself.calendar_view
Date is stored in params => refreshing page will not lose current period
TODO:
event durationstarts_at
attributetitle
@adrianthedev 's requirements:
Fixes # (issue)
Checklist:
Screenshots & recording
Manual review steps
Manual reviewer: please leave a comment with output from the test if that's the case.