-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: Issue 189, implement agendaEvent slot #220
base: master
Are you sure you want to change the base?
Conversation
From a quick look, it looks correct to me that you have added it to the I can have a look at the TS-errors |
Thanks, I'll look at the changes you've suggested tonight and get them resolved! |
Cool! I pushed a little something to fix the TS-error in Header.vue |
7044e14
to
99cf988
Compare
Per issue 189, this implements custom agenda events via an agendaEvent slot. This will be displayed on mobile, similar to the monthEvent and dayEvent Update types.ts Update Header.vue Modify css so that custom event doesn't inherit colors Per discussion with Tom, modifying the css so that the custom agenda event doens't modify the css. fix cypress Update cypress.config.ts
Hey, I've made those changes. The last thing I need to do is the unit tests. I was looking through the code but it didn't jump out at me how you determine if your in mobile or desktop view to be in "agenda" mode. I need to mock this in the unit tests to create the customAgenda test. Any chance you know this off the top of your head (or approximately where I should snoop around)? Cheers |
Hi. I've been trying to write some unit tests for the slots before, and was never happy with the way they ended up: so I deleted them and now rely on the Cypress tests instead. For me it's fine the way you've tested it now. The most critical piece of logic added here: isCustomAgendaEvent() {
// Logic to determine if this event should use a custom agenda event slot
if (Array.isArray(this.calendarEvent.isCustom)) {
return this.calendarEvent.isCustom.includes('agenda');
}
return this.calendarEvent.isCustom || false;
}, is implicitly put under test through a combination of the Cypress-test you wrote, and |
# Conflicts: # development/data/seeded-events.ts
I now realized why we didn't add the agenda to the I just broke something, and will need to look through why. One last thing you could do, is perhaps to document the usage of |
Great, I'll do the docs update edit: sorry tomorrow night - today was busier than expected. |
Checklist
Please put "X" in the below checkboxes that apply::
I have tested the following:
This PR solves the following problem**.
There is currently no custom slot for agendaEvent. Have implemented it in line with Tom's suggestion. However, I need a little assistance. I have to change the modeType type to allow a modeType to be agenda, but while it works fine in dev it throws an error when I try to build (related to the modification of modeType). Alternatively, I can fix it by removing agenda from modeType, but then it means the custom agenda will only show when isCustom = true, vs the other modes which allow it to be turned on with isCustom = true or isCustom = ['week']
How to test this PR**.
Custom agenda slot is added to dev. Set isCustom to true or 'agenda' and run to see it.