-
Notifications
You must be signed in to change notification settings - Fork 664
Scheduler — Add hiddenDays option to hide arbitrary days of the week #33188
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
Open
aleksei-semikozov
wants to merge
57
commits into
DevExpress:26_1
Choose a base branch
from
aleksei-semikozov:feature/scheduler-hidden-days-impl-26_1
base: 26_1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
0016a32
Scheduler — Add hiddenDays option to hide arbitrary days of the week
aleksei-semikozov 2467600
Scheduler — Rename hiddenDays option to hiddenWeekDays per spec
aleksei-semikozov fbeace8
Scheduler — Add hiddenWeekDays to scheduler.d.ts source for ts-bundle…
aleksei-semikozov 18943b8
Revert "Scheduler — Add hiddenWeekDays to scheduler.d.ts source for t…
sjbur c385706
Revert "Scheduler — Rename hiddenDays option to hiddenWeekDays per spec"
sjbur 7cadb02
feat: rename hiddenDays to hiddenWeekDays and fix .d.ts
sjbur bbb309c
Merge branch '26_1' into feature/scheduler-hidden-days-impl-26_1
sjbur 97f1fe8
feat: add storybook
sjbur 4904ffa
refactor: fix typing
sjbur a4b0767
refactor: fix typing
sjbur f4ac369
feat: create helper for skipped days
sjbur 91d780d
fix: fix calculating hiddenDays for timeline
sjbur b1263af
fix: fix hiddenDays for timelineMonth
sjbur 2a11d14
refactor: optimize ts
sjbur 19f3964
fix: fix bug for view_generator for workWeek
sjbur d414219
fix: fix test
sjbur 2ab9e9b
refactor: remove useless typing
sjbur d9cedc5
fix: fix hiddenWeekDays for workWeek
sjbur da7160f
refactor: revert SkippedDaysAnchorKind
sjbur 1bcb103
refactor: optimize
sjbur 2b82fa5
feat: allow hiddenWeekDays for agenda
sjbur 9c71b48
refactor: optimize
sjbur e32349a
refactor: optimize
sjbur b341ca6
feat: create type WeekdayIndex for skippedDays
sjbur 6a2a314
feat: update agenda and header logic to support hiddenWeekDays
sjbur 9c81b76
feat: change agenda logic to show only calendar dates in interval min…
sjbur e30a7bd
fix: fix anchor day for workWeek
sjbur 54283e7
feat: remove WeekDayIndex interface because it requires too much main…
sjbur 2ccc554
fix: fix tests
sjbur faf52d4
test: update snapshot for santiago timezone for workWeek
sjbur c1b4969
test: fix test
sjbur 1fd1356
feat: update W1029 error text
sjbur f58d384
refactor: remove weekends logic from workspace
sjbur 433c33f
fix: fix defaults for skippedDays in workWeek
sjbur 418467c
fix: undo default value for skipWeekDays
sjbur 11f6b4f
fix: fix column rendering for workWeek
sjbur 3c255b3
fix: fix caption in navigator for week view
sjbur 5e87ccc
test: optimize tests
sjbur 862fffe
refactor: undo typing
sjbur 33e2a6b
test: add tests for work week layout with skippedDays scenarios
sjbur 8a9989c
feat: make global hiddenWeekDays affect timelineWorkWeek and workweek
sjbur daa6e6c
fix: fix test
sjbur 9d82f1c
fix: remove infinite loop risk from util functions
sjbur 3950716
Apply suggestion from @arman-boyakhchyan
sjbur 60b6e24
feat: update .d.ts for DayOfWeek type
sjbur 00ee28b
fix: fix singlequote error
sjbur dd3a8ab
refactor: change visibility of getVisibleDayOffset method to private
sjbur 47e7828
refactor: rename isSkippedDate to isDateSkipped
sjbur 3c408f6
refactor: simplify date increment logic using getFirstVisibleDate uti…
sjbur 8ccbb06
refactor: consolidate date handling for week and workWeek steps
sjbur 5886172
refactor: unify date handling functions for week and workWeek calcula…
sjbur 0f5a329
refactor: update getSkippedDaysCount parameter order for consistency …
sjbur a7c1825
refactor: streamline daysInInterval calculation for improved readability
sjbur fd13c8a
test: fix test
sjbur 1b666f2
feat: add support for day and timelineday
sjbur 1ed0d64
fix: fix tests
sjbur 7313053
refactor: unify week and workWeek date handling in getIntervalStartDa…
sjbur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
apps/react-storybook/stories/scheduler/SchedulerHiddenWeekDays.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import type { Meta, StoryObj } from "@storybook/react-webpack5"; | ||
| import dxScheduler from "devextreme/ui/scheduler"; | ||
| import { wrapDxWithReact } from "../utils"; | ||
| import { data, resources } from "./data"; | ||
|
|
||
| const Scheduler = wrapDxWithReact(dxScheduler); | ||
|
|
||
| const viewNames = ['day', 'week', 'workWeek', 'month', 'agenda', 'timelineDay', 'timelineWeek', 'timelineWorkWeek', 'timelineMonth']; | ||
|
|
||
| const meta: Meta<typeof Scheduler> = { | ||
| title: 'Components/Scheduler/HiddenWeekDays', | ||
| component: Scheduler, | ||
| parameters: { layout: 'padded' }, | ||
| }; | ||
|
|
||
| export default meta; | ||
|
|
||
| type Story = StoryObj<typeof Scheduler>; | ||
|
|
||
| export const Overview: Story = { | ||
| args: { | ||
| height: 600, | ||
| views: viewNames, | ||
| currentView: 'week', | ||
| currentDate: new Date(2021, 3, 26), | ||
| firstDayOfWeek: 0, | ||
| startDayHour: 9, | ||
| endDayHour: 22, | ||
| dataSource: data, | ||
| resources, | ||
| hiddenWeekDays: [], | ||
| }, | ||
| argTypes: { | ||
| height: { control: 'number' }, | ||
| views: { control: 'object' }, | ||
| hiddenWeekDays: { control: 'object' }, | ||
| currentView: { control: 'select', options: viewNames }, | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Snapshot changed
"Sat 7"→"Mon 9"in TimelineWorkWeek — is this intentional? Old snapshot had Mon-Sat (7 days), now skips Sat/Sun. Please confirm the newincrementDatelogic correctly handles TimelineWorkWeek headers.Uh oh!
There was an error while loading. Please reload this page.
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 is intended. This is bug not related with timezone. In the snapshot we saved a buggy state that no one noticed is buggy. In timelineWorkWeek we can't have weekend days. You can see the bug here: https://codepen.io/sjbur/pen/Kwgbqdr
Also attaching two screenshots: the first is original state with bug, second one is current implementation without bug.