Skip to content

TT-7038 PlanTabSelect doesn't includ Assignments for Personal projects#247

Merged
sarahentzel merged 1 commit intodevelopfrom
feature/TT-7038-pers-assign
Apr 13, 2026
Merged

TT-7038 PlanTabSelect doesn't includ Assignments for Personal projects#247
sarahentzel merged 1 commit intodevelopfrom
feature/TT-7038-pers-assign

Conversation

@gtryus
Copy link
Copy Markdown
Contributor

@gtryus gtryus commented Apr 8, 2026

  • Introduced a fixture for plan tab strings to streamline localization.
  • Updated memory mock to align with DataProvider for better testing.
  • Enhanced option handling in the dropdown to conditionally display items based on team type and offline status.
  • Simplified state management and improved readability in the component's logic.
  • Added tests to ensure correct rendering and functionality of the PlanTabSelect component.

- Introduced a fixture for plan tab strings to streamline localization.
- Updated memory mock to align with DataProvider for better testing.
- Enhanced option handling in the dropdown to conditionally display items based on team type and offline status.
- Simplified state management and improved readability in the component's logic.
- Added tests to ensure correct rendering and functionality of the PlanTabSelect component.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Plan sheet tab dropdown (PlanTabSelect) to conditionally include the Assignments option only when applicable (non-personal teams and not offline-only), and expands Cypress coverage to validate the updated behavior.

Changes:

  • Add team/offline-aware option building in PlanTabSelect (hide Assignments for personal teams and offline-only mode).
  • Adjust tab/option index resolution so the button label stays consistent when Assignments is hidden.
  • Refactor and expand Cypress component tests with an Orbit memory mock that supports useOrbitData('organization').

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/renderer/src/components/Sheet/PlanTabSelect.tsx Builds dropdown options based on team type + offlineOnly and maps tab indices to displayed option labels.
src/renderer/src/components/Sheet/PlanTabSelect.cy.tsx Adds fixtures/memory mocking to support useOrbitData, and adds coverage for personal-team + offline-only behavior.
Comments suppressed due to low confidence (1)

src/renderer/src/components/Sheet/PlanTabSelect.tsx:71

  • aria-owns is set to 'action-menu', but the actual <Menu> id is 'import-export-menu'. This breaks the ARIA ownership relationship (screen readers rely on the referenced id) and makes the attribute misleading. Align these by either changing aria-owns to reference the menu id, or renaming the menu id to match.
      <AltButton
        id="planTabSelect"
        aria-owns={actionMenuItem ? 'action-menu' : undefined}
        aria-label={t.sectionsPassages}
        onClick={handleMenu}
      >
        {options[optionIndex] ?? options[0]}
        <DropDownIcon sx={{ ml: 1 }} />
      </AltButton>
      <Menu
        id="import-export-menu"
        anchorEl={actionMenuItem}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/renderer/src/components/Sheet/PlanTabSelect.cy.tsx
Comment thread src/renderer/src/components/Sheet/PlanTabSelect.cy.tsx
@sarahentzel sarahentzel merged commit 7028d82 into develop Apr 13, 2026
6 checks passed
@sarahentzel sarahentzel deleted the feature/TT-7038-pers-assign branch April 13, 2026 16:56
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.

3 participants