-
Notifications
You must be signed in to change notification settings - Fork 547
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
Advanced repeat rules UI #8422
base: dev-calendar
Are you sure you want to change the base?
Advanced repeat rules UI #8422
Conversation
c8134f0
to
040498f
Compare
30a7bb4
to
7aefc39
Compare
ffbc61b
to
be4c63a
Compare
be4c63a
to
e3da4ff
Compare
a0e43a2
to
4ff0a1d
Compare
cf65d58
to
7446664
Compare
d0e574b
to
945ddb4
Compare
Fixed the issue by allowing users to change the end date back to the same date as the initial date.
This commit adds a validation to mark short year/month dates as invalid. The only validation that we were doing was if Date(str) is valid, which is but not valid as intended to be. e.g. 00-07 would be interpreted as 07/1900 by JS Date instead of 07/2000 as expected.
Fixed Outlook event invite descriptions to preserve links after sanitization by applying the prepareCalendarDescription function
Add calendar info, color, name, and type, at event popup and event details (search and agenda view) Changes icon alignment to always align to the top, except when the data displayed fits in a single line, in this case it's centered.
This commits creates a new Calendar view, adding three day view and change the icon for Week View, making it easier to recognize both views.
This commit adds the options to select a default value for three days and week views to scroll to.
Co-authored-by: André Dias <[email protected]>
Co-authored-by: paw-hub <[email protected]>
Co-authored-by: André Dias <[email protected]>
Co-authored-by: André Dias <[email protected]>
Some rules aren't supported during event creation/editing. This commit adds an info banner warning about losing rules if user edits and event with unsupported rules. Co-authored-by: André Dias <[email protected]>
Co-authored-by: pas <[email protected]>
To have the SDK we must move the tests from unit to Instrumented Tests as unit tests aren't able to load our compiled SDK since the target mismatches (Unit tests require linux-x86-64). Mockito isn't able to mock final classes and instead of making all of them open, we can use dexmaker to proxy the classes and be able to fully mock final classes. This commit introduces dexmaker as a dependency and also overrides dexmaker mockito-core with a more updated one.
The way that we count events and occurrences changed with the implementation of the advanced repeat rules, given that, we've had to fix tests that relies on these counts. This commit address one corner case for weekly events expansion on SDK and fixes the tests on Swift.
945ddb4
to
199b04d
Compare
cabb90a
to
03f14a6
Compare
const options: IntervalOption[] = [ | ||
{ | ||
value: 0, | ||
ariaValue: "same day", |
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.
Use the translation as aria value so screen readers can announce the correct value for the options
const bydayRules = whenModel.advancedRules.filter((rule) => rule.ruleType == ByRule.BYDAY) | ||
if (bydayRules.length == 1) { | ||
const weekday: Weekday = Object.values(Weekday)[DateTime.fromJSDate(date).weekday - 1] | ||
const regex = /^-?\d/g // Regex for extracting the first digit from interval |
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.
This will fail if the user has imported an event with a ByDay rule with +2TH (RFC allows this).
Either we take care of this during import, or we adapt this regex to support the + sign
* we only specify what weekday of the month this event repeats on. (Ex.: BYDAY=2TH = Repeats on second THURSDAY of every month) | ||
* In case weekdays.length() == 0 && interval == 0, no BYDAY Rule shall be written, as the event will repeat on the same DAY every month. | ||
*/ | ||
private async createAdvancedRulesFromWeekdays(weekdays: Weekday[], interval?: number): Promise<AdvancedRepeatRule[]> { |
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.
Why async?
@@ -486,24 +486,122 @@ export const createCustomEndTypeOptions = (): ReadonlyArray<RadioGroupOption<End | |||
] | |||
} | |||
|
|||
export const createRepeatRuleEndTypeValues = (): SelectorItemList<EndType> => { | |||
export const weekdayToTranslation = (): Array<WeekdayToTranslation> => { |
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.
I think we can change it to an Array instead of a function. I'm not sure if it will break any rendering
options: this.repetitionOptions, | ||
noIcon: false, | ||
expanded: false, | ||
tabIndex: Number(TabIndex.Programmatic), |
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.
This takes the select component out of the element three, making it unreachable through tabbing
50766e0
to
1361e3a
Compare
Selecting the time frame for rules will now render day/week/month/year correctly
Adds a new component to select the weekday were an event with weekly frequency should occur.
Fix undefined weekdays being written on AdvancedRules
When changing the date outside of the RepitionEditor, the advanced repeat rules would still use the old weekday. Now, when changing the date, it will also change the advanced repeat rules that have been configured
Drag and dropping an event inside the CalendarView would create inconsistencies within the advanced repeat rules.
The ARR on weekly events doesn't need to be handled, so this commit stops moving the ARR and also fixes an overflow on the main page of the event editor when the user has multiple days for a weekly repeating rule.
d8149cd
to
5c44da5
Compare
closes #8047