-
Notifications
You must be signed in to change notification settings - Fork 0
Days per grid page option #383
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
jzgom067
wants to merge
24
commits into
v0.4.7
Choose a base branch
from
page-days-option
base: v0.4.7
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
24 commits
Select commit
Hold shift + click to select a range
7adfb4a
Create useGridPageDays hook with constants
jzgom067 ca98591
Add state to useGridPageDays
jzgom067 12ab942
Create grid page days selector
jzgom067 83f0e2e
Add pageDays prop to ScheduleGrid
jzgom067 d099ce4
Merge branch 'grid-preview-removal' into page-days-option
jzgom067 4ac3fe1
Add grid page days selector to grid pages
jzgom067 da0666a
Dynamically hide grid preview footer
jzgom067 054b138
Add mobile grid page day selectors
jzgom067 90cd1bd
Add compact grid header functionality
jzgom067 c7272a9
Remove colon for consistency
jzgom067 c58016e
Add adaptive compact header for desktop
jzgom067 ee93107
Fix mobile display settings showing on desktop
jzgom067 92fbf25
Simplify logic for visiting all pages
jzgom067 6d587aa
Fix out of bounds pagination bug
jzgom067 0a196b6
Add preview message to mobile editor
jzgom067 40dd443
Add sticky grid header to mobile preview
jzgom067 3e0073e
Update preview text for event editing
jzgom067 f53dbb6
Reorder ScheduleGrid props
jzgom067 39993ec
Merge branch 'v0.4.7' into page-days-option
jzgom067 8b47ac4
Add useCallback to paginate
jzgom067 b6de935
Add unique id to GridPageDaysSelector
jzgom067 216b556
Fix stale page value reference
jzgom067 ee962be
Optimize header condensation
jzgom067 22bc0ac
Merge branch 'page-days-option' of https://github.com/plan-cake/planc…
jzgom067 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
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
27 changes: 27 additions & 0 deletions
27
frontend/src/features/event/components/selectors/grid-page-days.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,27 @@ | ||
| import Selector from "@/features/selector/components/selector"; | ||
|
|
||
| export default function GridPageDaysSelector({ | ||
| id, | ||
| value, | ||
| options, | ||
| onChange, | ||
| }: { | ||
| id: string; | ||
| value: number; | ||
| options: number[]; | ||
| onChange: (value: number) => void; | ||
| }) { | ||
| return ( | ||
| <Selector | ||
| id={id} | ||
| value={value} | ||
| options={options.map((option) => ({ | ||
| value: option, | ||
| label: `${option} days`, | ||
| }))} | ||
| onChange={onChange} | ||
| dialogTitle="Select Days per Page" | ||
| dialogDescription="Select the number of days to display per page" | ||
| /> | ||
| ); | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| export const SIDE_WIDTH = 30; | ||
| export const TIME_LABEL_WIDTH = 50; | ||
|
|
||
| export const GRID_PAGE_DAYS_MOBILE_OPTIONS = [4, 7]; | ||
| export const GRID_PAGE_DAYS_DESKTOP_OPTIONS = [7, 14]; | ||
| export const GRID_PAGE_DAYS_MOBILE_KEY = "grid-page-days-mobile"; | ||
| export const GRID_PAGE_DAYS_DESKTOP_KEY = "grid-page-days-desktop"; |
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.
Uh oh!
There was an error while loading. Please reload this page.