Skip to content

Commit 83b9709

Browse files
Update schedule page - Program/Schedule page filter
* allow time slots to be associated with an event sponsor this will enable the ability for a time slot to be displayed on an event website with an associated event sponsor * finalize schedule appearence redesign schedule to align with Gina's design. Next steps is wiring up the schedule fly out. * schedule fly out this could use some additional work to make it a bit cleaner. But for now it gets the job done. fly out partial is hidden outside the right side of the screen. When a title is clicked, the elemnt matching that titles id is 'revealed' as the side panel slides out. * program filter pane use stimulus to filter the content on the program page. method used: - filter partial is added to the page side panel - form in filter partial, has a filter stimulus controller wrapped around it - when form inputs are changed, stimulus fires event to update page contents - update page contents using dom_ids for relevent filterable attributes * add filter to schedule side panel Reuse the filter controller by initilizing it with the class name of the 'cards' that it is filtering through Also reverse the direction that the filter works. All values start unchecked, checking box, filters view & then updates counts Additional Notes - Rename schedule card partial to time_slot - Make filtering an async function, update counts after completion - Hide elements using 'display:none' instead of hidden attribute (hidden wouldn't work with the CSS Grid on the schedule) * fixes per PR code review * update schedule test to consider session format configuration * schedule loads displaying the event current day * Display placeholder message if filter produces no resutls When filtering, if an applied filter resluts in all session content being hidden the stimulus controller will apply an empty class to the container. That will lean in to some CSS magic to dispalys a "No results message" to the user Also add some hover effect to the filter icon. * add sponsor presents to time slot display additionally I moved the sub_nav style to shared, so program and schedule were using the same sub nav css Also added a check for empty containers on filter reset. * collapse schedule block when cards filtered out Had to resort to something interesting here, and Can redo this if someone suggests a better method. In order to collapse the schedule blocks when their time slots had been filtered out I had to create custom class that defined a filtercontainer in a way that it could have sub containers (in this case 'schedule-block-containers'). Now when the stimulus controller calls apply filter it sill loop over the containers and update their apperence. IF a container has sub-containers, it will loop through them and update their apperance as well (i.e. give them an 'empty' class. Essentially collapse them) * pull the bindings out of my schedule spec move time helper to rails_helper file * rework 'schedule load on correct date feature' with caching consideration Use on page JS to load the schedule on the correct page. When the page loads, the schedule will display a link for every event day. The JS will determine what day it is for the user, and - IF it is before the event OR 1 day after event it will load on the first event day - IF it is during the event it will loop over the event days, and click on the current day.
1 parent b899f20 commit 83b9709

40 files changed

+1130
-303
lines changed
202 Bytes
Loading
580 Bytes
Loading
705 Bytes
Loading
31 Bytes
Loading
Lines changed: 3 additions & 0 deletions
Loading

app/assets/stylesheets/themes/default/application.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@import 'colors';
2+
@import 'shared';
23
@import 'nav';
34
@import 'footer';
45
@import 'program';
@@ -35,6 +36,7 @@ body {
3536
header + #content {
3637
background-color: var(--main_content_background);
3738
margin-top: 110px;
39+
min-height: 95vh;
3840
}
3941

4042
p {

app/assets/stylesheets/themes/default/colors.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:root {
2+
--beige: #F4EEE6;
23
--black: #000000;
34
--blue: #3444DA;
45
--blue-dark: #417D7A;
@@ -14,7 +15,7 @@
1415
--grey-light: #C4C4C4;
1516
--grey-lighter: #F5F5F5;
1617
--grey-lightest: #E7E7E7;
17-
--grey-logo: #E6E6E6;
18+
--grey-secondary: #E6E6E6;
1819
--orange: #FFBC90;
1920
--orange-burnt: #EA652C;
2021
--pastel-pink: #F94975;
@@ -29,9 +30,11 @@
2930
--red-dark: #E14943;
3031
--red-light: #E14943;
3132
--silver: #E0E0E0;
33+
--silver-border: #EBEBEB;
34+
--sponsor-tag: #F8B400;
3235
--teal: #48c892;
3336
--text: var(--grey);
34-
--text-secondary: #515151;
37+
--text-secondary: #5E5E5E;
3538
--yellow: #FFD801;
3639
--white: #FFFFFF;
3740

app/assets/stylesheets/themes/default/program.scss

Lines changed: 22 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -70,55 +70,6 @@
7070
}
7171
}
7272

73-
.program-filter-pane {
74-
img {
75-
margin: 0 auto 15px;
76-
display: block;
77-
padding: 6px 6px;
78-
border-radius: 50%;
79-
border: 2px solid var(--red-light);
80-
81-
82-
&.close-filter-icon {
83-
background-color: var(--red-light);
84-
}
85-
}
86-
}
87-
88-
.sub-nav {
89-
display: flex;
90-
align-items: center;
91-
justify-content: center;
92-
margin: 0 0 6px 60px;
93-
94-
ul {
95-
margin: 0;
96-
padding: 0;
97-
display: flex;
98-
gap: 30px;
99-
li {
100-
margin: 0;
101-
padding: 0;
102-
a {
103-
font-size: 24px;
104-
font-weight: 700;
105-
display: block;
106-
color: var(--grey-light);
107-
width: 100%;
108-
margin: auto;
109-
text-align: center;
110-
text-decoration: none;
111-
&:hover, &.selected {
112-
color: var(--red-light);
113-
box-shadow: 0 4px var(--main_content_background),
114-
0 7px var(--red-light);
115-
transition: all 300ms;
116-
}
117-
}
118-
}
119-
}
120-
}
121-
12273
.program-sessions-wrapper {
12374
display: flex;
12475
margin: auto;
@@ -130,10 +81,28 @@
13081
background-color: var(--main_content_background);
13182
padding: 20px 0 0 0;
13283
margin-bottom: 40px;
133-
border-top: 0.5px solid rgba(0, 0, 0, 0.1);
84+
85+
&.empty .empty-placeholder {
86+
display: block !important;
87+
text-align: center;
88+
margin-top: 30px;
89+
90+
h3 {
91+
font-size: 18px;
92+
font-weight: 800;
93+
margin-bottom: 8px;
94+
}
95+
96+
p {
97+
font-family: var(--secondary-body-font);
98+
line-height: 130%;
99+
}
100+
}
134101
}
135102

136-
.session {
103+
104+
105+
.session-card {
137106
display: flex;
138107
position: relative;
139108
justify-content: space-between;
@@ -151,7 +120,6 @@
151120
height: 5rem;
152121
}
153122

154-
// UNDERLINE COLOR, FONT FAMILY
155123
.session-title {
156124
font-size: 21px;
157125
font-weight: 700;
@@ -187,34 +155,6 @@
187155
}
188156

189157
.fly-out-wrapper {
190-
position: fixed;
191-
top: 0;
192-
bottom: 0;
193-
padding-top: 160px;
194-
width: 40%;
195-
height: 100%;
196-
z-index: 10;
197-
background-color: var(--white);
198-
border: 1px solid black;
199-
transition: all 1s;
200-
overflow: scroll;
201-
202-
203-
&.open {
204-
right: 0;
205-
206-
}
207-
208-
&.closed {
209-
right: -40%;
210-
}
211-
212-
.close-icon {
213-
position: absolute;
214-
right: 40px;
215-
top: 140px;
216-
}
217-
218158
.program-session-detail {
219159
margin: 0 40px 50px 30px;
220160
overflow: scroll;
@@ -274,15 +214,9 @@
274214
.program-sessions-wrapper {
275215
padding: 15px 10px;
276216
}
277-
.session {
217+
.session-card {
278218
width: 40%;
279219
}
280-
281-
.fly-out-wrapper {
282-
width: 70%;
283-
&.open { right: 0 }
284-
&.closed { right: -70%; }
285-
}
286220
}
287221

288222

@@ -294,13 +228,7 @@
294228
padding: 25px;
295229
}
296230

297-
.session {
298-
width: 100%;
299-
}
300-
301-
.fly-out-wrapper {
231+
.session-card {
302232
width: 100%;
303-
&.open { right: 0; }
304-
&.closed { right: -100%; }
305233
}
306234
}

0 commit comments

Comments
 (0)