Skip to content

[UX]: Hide "View sync details" and "Sync now" for local-only documents #105

@Gautam25Raj

Description

@Gautam25Raj
  • Branch Name: refactor/studio-local-doc-sync-menu
  • PR Title: [Feature] [Studio]: refactor document actions sync options based on cloud presence

Affected Apps / Packages

  • Studio (apps/studio)

Is your feature request related to a problem?

Yes. In the Documents library page, the action menu (DocumentActionsMenu.tsx) for each document displays "Sync now" and "View sync details".
If a document has never been synced to the cloud (it is local-only), showing "View sync details" is confusing since it has no sync history or cloud destination. However, hiding both options is also problematic because it completely blocks the user from uploading the document to the cloud.

Describe the solution you'd like

We should conditionally render the actions in DocumentActionsMenu.tsx based on doc.sync?.cloudDocumentId:

  • If cloudDocumentId is present (already synced):
    • Display "Sync now" (or "Syncing...")
    • Display "View sync details"
  • If cloudDocumentId is null (local-only):
    • Display "Upload to cloud" or "Sync to cloud" instead of "Sync now".
    • Hide the "View sync details" menu item.

Describe alternatives you've considered

  • Hiding both actions, which completely disables syncing local-only documents.
  • Leaving both actions as they are, which displays a confusing, empty sync details modal for unsynced files.

Additional Context

The doc.sync object is already fetched inside the library snapshot, so we don't need any additional API fetches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendUI/client-side codeui/uxDesign or user experience improvements
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions