A platform for community discussion. Free, open, simple.
UX: use placeholder for calendars in posts (#45340)
Kris3c5813a46d3f
diff --git a/app/assets/stylesheets/common/upcoming-changes/uc-modernize-foundation-theme/calendar.scss b/app/assets/stylesheets/common/upcoming-changes/uc-modernize-foundation-theme/calendar.scssindex aa442e508fc..ca6407101d8 100644--- a/app/assets/stylesheets/common/upcoming-changes/uc-modernize-foundation-theme/calendar.scss+++ b/app/assets/stylesheets/common/upcoming-changes/uc-modernize-foundation-theme/calendar.scss@@ -2,16 +2,6 @@.fc .fc-button-primary {--fc-button-bg-color: var(--secondary);--fc-button-border-color: var(--primary-200);- --fc-button-active-bg-color: var(--primary-200);--fc-button-hover-bg-color: var(--primary-100);}-- .fc-button-active {- color: var(--primary) !important;-- &:focus {- background-color: var(--primary-200) !important;- color: var(--primary) !important;- }- }}diff --git a/plugins/discourse-events/assets/javascripts/discourse/components/post-calendar.gjs b/plugins/discourse-events/assets/javascripts/discourse/components/post-calendar.gjsindex 9ae13e43837..254d75bf84d 100644--- a/plugins/discourse-events/assets/javascripts/discourse/components/post-calendar.gjs+++ b/plugins/discourse-events/assets/javascripts/discourse/components/post-calendar.gjs@@ -294,6 +294,7 @@ export default class PostCalendar extends Component {@height={{@height}}@leftHeaderToolbar={{this.leftHeaderToolbar}}@onLoadEvents={{this.loadEvents}}+ @placeholder={{true}}@refreshKey={{@post.id}}@rightHeaderToolbar="timeGridDay,timeGridWeek,dayGridMonth,listYear"/>diff --git a/plugins/discourse-events/assets/stylesheets/common/calendar-placeholder.scss b/plugins/discourse-events/assets/stylesheets/common/calendar-placeholder.scssindex 31c89b0100c..d8b419e77ee 100644--- a/plugins/discourse-events/assets/stylesheets/common/calendar-placeholder.scss+++ b/plugins/discourse-events/assets/stylesheets/common/calendar-placeholder.scss@@ -17,6 +17,10 @@gap: 0.5rem;font-size: var(--font-0);+ @include viewport.until(md) {+ flex-wrap: wrap;+ }+@include viewport.from(md) {font-size: var(--font-down-1);}@@ -43,7 +47,22 @@// the real title is an h2, which picks up this spacing inside the topic list#list-area &__title {- margin: var(--space-5) 0 var(--space-3);+ @include viewport.from(sm) {+ margin: var(--space-5) 0 var(--space-3);+ }+ }++ // post calendars use a compact toolbar with the title beside the nav buttons+ .post-calendar & {+ gap: 0;+ }++ .post-calendar &__toolbar {+ padding: 0.25rem;++ @include viewport.until(md) {+ justify-content: flex-start;+ }}&__grid,