Skip to content
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

Open
wants to merge 51 commits into
base: dev-calendar
Choose a base branch
from

Conversation

Patrik-wav
Copy link
Contributor

closes #8047

@murilopereirame murilopereirame force-pushed the 8046-parse-advanced-repeat-rules branch 2 times, most recently from c8134f0 to 040498f Compare February 3, 2025 08:23
@tutao-mac tutao-mac force-pushed the 8046-parse-advanced-repeat-rules branch 2 times, most recently from 30a7bb4 to 7aefc39 Compare February 3, 2025 08:45
@murilopereirame murilopereirame force-pushed the 8046-parse-advanced-repeat-rules branch 2 times, most recently from ffbc61b to be4c63a Compare February 4, 2025 06:54
@tutao-mac tutao-mac force-pushed the 8046-parse-advanced-repeat-rules branch from be4c63a to e3da4ff Compare February 4, 2025 07:13
@murilopereirame murilopereirame force-pushed the 8046-parse-advanced-repeat-rules branch from a0e43a2 to 4ff0a1d Compare February 4, 2025 08:05
@tutao-mac tutao-mac force-pushed the 8046-parse-advanced-repeat-rules branch 3 times, most recently from cf65d58 to 7446664 Compare February 5, 2025 12:25
@murilopereirame murilopereirame force-pushed the 8046-parse-advanced-repeat-rules branch 10 times, most recently from d0e574b to 945ddb4 Compare February 12, 2025 15:10
Base automatically changed from 8046-parse-advanced-repeat-rules to dev-calendar February 13, 2025 04:19
andrehgdias and others added 8 commits February 13, 2025 05:26
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.
mup and others added 14 commits February 13, 2025 05:26
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]>
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.
const options: IntervalOption[] = [
{
value: 0,
ariaValue: "same day",
Copy link
Contributor

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
Copy link
Contributor

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[]> {
Copy link
Contributor

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> => {
Copy link
Contributor

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),
Copy link
Contributor

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

Patrik-wav and others added 11 commits February 19, 2025 10:08
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.
@murilopereirame murilopereirame force-pushed the 8047-advanced-repeat-rules-ui branch from d8149cd to 5c44da5 Compare February 19, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants