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

410 open in side panel #10363

Merged
merged 27 commits into from
Feb 21, 2025
Merged

410 open in side panel #10363

merged 27 commits into from
Feb 21, 2025

Conversation

bosiraphael
Copy link
Contributor

@bosiraphael bosiraphael commented Feb 20, 2025

Closes twentyhq/core-team-issues#410

  • Added openRecordIn column in the view entity, which is set to SIDE_PANEL by default
  • Created a new option inside the view option dropdown to be able to set openRecordIn
  • Updated all record show page openings to reflect the setting behavior
  • For workflow, workflowVersion and workflowRun (what I call workflow objects), we want the default view openRecordIn to be set to RECORD_PAGE. When seeding the views for the new workspaces, we set openRecordIn to RECORD_PAGE for workflow objects. Since the workflow objects views openRecordIn will be set to the default value SIDE_PANEL for the existing workspaces when the sync metadata runs, I created a script to run in the 0.43 update to update this value.
  • Updated closeCommandMenu because of problems introduced by the animate presence wrapper around the command menu. We now reset the states at the end of the animation.

Note: We want to be able to open all workflow objects pages in the side panel, but this requires some refactoring of the workflow module. For now @Bonapara wanted to allow the possibility to change the openRecordIn setting to SIDE_PANEL even for the workflows even if it's buggy and not ready for the moment. Since this is an experimental feature, it shouldn't cause too many problems.

@bosiraphael bosiraphael linked an issue Feb 20, 2025 that may be closed by this pull request
@bosiraphael bosiraphael marked this pull request as ready for review February 20, 2025 15:36
Copy link
Contributor

@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

This PR adds functionality to control how records are opened (in a side panel or record page) through a new openRecordIn column in the view entity, with workflow objects defaulting to record page view.

  • Added ViewOpenRecordInType enum and openRecordIn field to view entity, defaulting to SIDE_PANEL for most objects
  • Implemented view settings dropdown UI with "Open in" option to toggle between side panel and record page modes
  • Added migration script UpdateDefaultViewRecordOpeningOnWorkflowObjectsCommand to set workflow objects to RECORD_PAGE by default
  • Fixed command menu animation issues by splitting close functionality into two parts: initial close and post-animation cleanup
  • Removed hardcoded workflow object show page redirection in favor of configurable view-level settings

38 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile

@bosiraphael bosiraphael enabled auto-merge (squash) February 21, 2025 09:26
@bosiraphael bosiraphael merged commit 9f454c5 into main Feb 21, 2025
46 checks passed
@bosiraphael bosiraphael deleted the 410-open-in-side-panel branch February 21, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open in Side Panel
2 participants