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

Refactor RecordTableCellContainer to avoid re-render between soft focus and display mode #5953

Open
lucasbordeau opened this issue Jun 19, 2024 · 1 comment
Assignees

Comments

@lucasbordeau
Copy link
Contributor

Scope & Context

RecordTableCellContainer component.

Current behavior

When we switch between soft focus and display mode, the display component gets re-rendered, which can cause problems, like an avatar re-rendering and creating a flash for a broken URL for example.

Expected behavior

We would like to avoid this when switching between display and soft focus mode, the display component shouldn't be re-rendered.

See if we can merge the logic between display and soft focus component without causing too much negative impact on performance.

This PR should be linked to the refactoring work on : #5928

@lucasbordeau lucasbordeau self-assigned this Jun 19, 2024
Copy link

greptile-apps bot commented Jun 19, 2024

To refactor RecordTableCellContainer to avoid re-render between soft focus and display mode:

  1. Locate RecordTableCellContainer in src/components/RecordTableCellContainer.js.
  2. Identify the state or props that trigger re-renders between soft focus and display mode.
  3. Merge the logic for display and soft focus modes into a single component state to prevent unnecessary re-renders.
  4. Ensure that the component only updates the necessary parts of the UI when switching modes.
  5. Test the changes to confirm that the avatar and other elements do not re-render unnecessarily.

Refer to issue #5928 for related refactoring work.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant