-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: Revamp navigation bar #6031
base: main
Are you sure you want to change the base?
feat: Revamp navigation bar #6031
Conversation
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.
PR Summary
- Introduced
useRecordShowPagePagination
hook for record show page pagination - Added
viewBarId
prop toRecordTable
andRecordTableWithWrappers
- Updated
RecordTableContextProps
to includeviewBarId
- Enhanced
PageHeader
with pagination buttons and updated styles - Modified
useChipFieldDisplay
to append view ID tolinkToShowPage
7 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
const navigateToPreviousRecord = () => { | ||
const prevRecord = objectRecords[currentRecordPosition - 1]; | ||
navigate( | ||
`/object/${objectNameSingular}/${prevRecord.id}${ | ||
viewIdQueryParam ? `?view=${viewIdQueryParam}` : '' | ||
}`, | ||
); | ||
setCurrentRecordPosition(currentRecordPosition - 1); | ||
}; |
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.
🧠 logic: Ensure currentRecordPosition - 1
is within bounds before accessing objectRecords
.
const navigateToNextRecord = () => { | ||
const nextRecord = objectRecords[currentRecordPosition + 1]; | ||
navigate( | ||
`/object/${objectNameSingular}/${nextRecord.id}${ | ||
viewIdQueryParam ? `?view=${viewIdQueryParam}` : '' | ||
}`, | ||
); | ||
setCurrentRecordPosition(currentRecordPosition + 1); | ||
}; |
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.
🧠 logic: Ensure currentRecordPosition + 1
is within bounds before accessing objectRecords
.
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.
PR Summary
(updates since last review)
- Enhanced pagination logic in
useRecordShowPagePagination.ts
- Added
viewBarId
property to context inRecordTableCell.perf.stories.tsx
- Replaced back button with close button in
PageHeader.tsx
- Introduced pagination and close button in
RecordShowPage.tsx
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
- Reordered imports in
useRecordShowPagePagination.ts
- Reformatted code for better readability
- Ensured correct invocation of
fetchMoreRecords
- Adjusted logic for fetching more records for clarity
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
- Updated mock data for
peopleMock
- Added new GraphQL query handler for
FindManyPeople
- Improved accuracy of Storybook tests for
RecordShowPage
component
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
- Simplified
useEffect
dependency array inuseRecordShowPagePagination.ts
- Potential impact on pagination state management and updates
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Pass view id to showpage on Kanban |
closes: #4428
Testing for fetchMoreRecords is pending, along with component tests