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

feat: Revamp navigation bar #6031

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

AdityaPimpalkar
Copy link
Contributor

@AdityaPimpalkar AdityaPimpalkar commented Jun 26, 2024

closes: #4428

Testing for fetchMoreRecords is pending, along with component tests

Copy link

@greptile-apps greptile-apps bot left a 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 to RecordTable and RecordTableWithWrappers
  • Updated RecordTableContextProps to include viewBarId
  • Enhanced PageHeader with pagination buttons and updated styles
  • Modified useChipFieldDisplay to append view ID to linkToShowPage

7 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

Comment on lines 141 to 149
const navigateToPreviousRecord = () => {
const prevRecord = objectRecords[currentRecordPosition - 1];
navigate(
`/object/${objectNameSingular}/${prevRecord.id}${
viewIdQueryParam ? `?view=${viewIdQueryParam}` : ''
}`,
);
setCurrentRecordPosition(currentRecordPosition - 1);
};
Copy link

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.

Comment on lines 151 to 159
const navigateToNextRecord = () => {
const nextRecord = objectRecords[currentRecordPosition + 1];
navigate(
`/object/${objectNameSingular}/${nextRecord.id}${
viewIdQueryParam ? `?view=${viewIdQueryParam}` : ''
}`,
);
setCurrentRecordPosition(currentRecordPosition + 1);
};
Copy link

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.

Copy link

@greptile-apps greptile-apps bot left a 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 in RecordTableCell.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

Copy link

@greptile-apps greptile-apps bot left a 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

Copy link

@greptile-apps greptile-apps bot left a 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

Copy link

@greptile-apps greptile-apps bot left a 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 in useRecordShowPagePagination.ts
  • Potential impact on pagination state management and updates

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@FelixMalfait
Copy link
Member

Pass view id to showpage on Kanban

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.

Revamp Navigation Bar in Shows for Enhanced Usability
2 participants