Skip to content

Ensure row actions in context menu are also displayed in Table inspector #4417

@pavish

Description

@pavish

Problem

  • Implement context menu to duplicate records #4414 adds a 'Duplicate Record' functionality.
  • This functionality is added to the Row context options, which appears when user right-clicks on a row.
  • The Row context options also contains options for opening the record page, and deleting the record.
  • We have a 'Record' section in the table inspector which contains options for opening the record page & deleting records. The available options vary based on how many records are selected.
  • We need 'Duplicate Record' to be present in the table inspector -> Record tab.
  • Similary, we'd like any new record specific action we add to be present in both places.

Proposed solution

  • The part of code that contains these actions are currently duplicated in both places. We would like to have a single place where we control this, preferably a common component under /systems/table-view. A separate directory for row related actions can be created.
  • RowContextOptions contains menu items whereas RecordMode contains Buttons. This is because both places require different dom structure as well as visual changes.
  • The new component that contains the actions should be headless, i.e. should not render the parent elements. It can however render the children, such the contents of buttons & links. The rendering of the parent elements should happen in the respective places, RowContextOptions and RecordMode components.
  • The new component should also accept multiple rowIds (row.identifier). This way it can handle both single and multiple records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedCommunity contributors can implement thisreadyReady for implementationtype: enhancementwork: frontendRelated to frontend code in the mathesar_ui directory

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions