Skip to content

Conversation

@JamalAlabdullah
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah commented Nov 27, 2025

Description

CLOSES: #17063

Replaced gitea popover with dropdown menu

Solution
Screen.Recording.2025-11-27.at.14.46.58.mov

---

Verification

  • Related issues are connected (if applicable)
  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Summary by CodeRabbit

  • Improvements

    • Three‑dots menu rebuilt as a dropdown for smoother, more consistent interaction.
    • Repository action now opens in a new browser tab.
    • Local Changes modal and menu items restyled for improved visual consistency, spacing and accessibility labels.
    • Menu trigger and items include updated accessibility labelling.
  • Tests

    • UI tests updated to reflect menu items now use button elements for navigation actions.

✏️ Tip: You can customize this high-level summary in your review settings.

@JamalAlabdullah JamalAlabdullah linked an issue Nov 27, 2025 that may be closed by this pull request
@github-actions github-actions bot added area/version-control Area: Related to version control for files in apps. skip-releasenotes Issues that do not make sense to list in our release notes frontend solution/studio/designer labels Nov 27, 2025
@JamalAlabdullah JamalAlabdullah changed the title replaced gitea popover with dropdown menu chore: replaced gitea popover with dropdown menu Nov 27, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

Walkthrough

ThreeDotsMenu was converted from a popover/list implementation to a StudioDropdown-based menu; LocalChangesModal’s triggerClassName prop and exported prop type were removed and it now uses a CSS module; several CSS modules were added/modified; tests and Playwright helper now target a button instead of a link.

Changes

Cohort / File(s) Summary
CSS tweaks & additions
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ClonePopoverContent/ClonePopoverContent.module.css, src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.module.css, src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.module.css, src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.module.css
Added padding: 0% to .link in ClonePopoverContent.module.css; added .link { padding-left: 0 } and .button { width: fit-content } in LocalChangesActionButton.module.css; added .dialog and .headerBlock classes in LocalChangesModal.module.css; removed all class definitions from ThreeDotsMenu.module.css.
Component structure & styling hooks
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx, src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx, src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.tsx
Replaced StudioPopover/StudioList with StudioDropdown and reorganised menu items; added handleClick to open repository URL; LocalChangesModal signature changed to accept no props and uses the new CSS module; LocalChangesActionButton now applies classes.link and classes.button.
Exports & tests
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/index.ts, src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.test.tsx, src/Designer/frontend/testing/playwright/components/AppDevelopmentHeader.ts
Removed exported type LocalChangesModalProps; unit test and Playwright component updated to query/click a button (previously a link) for the repository action.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect ThreeDotsMenu.tsx for correct StudioDropdown wiring, ARIA labels and handleClick navigation.
  • Verify all call sites no longer pass or expect triggerClassName/LocalChangesModalProps.
  • Review visual/regression impact from removed ThreeDotsMenu.module.css rules and new LocalChangesModal styles.
  • Check LocalChangesActionButton class usage and update tests/selectors consistency.

Poem

🐰 I nudged the popover into a dropdown stream,

I pared a prop and stitched a CSS seam,
Links turned to buttons, hopping light and spry,
Dialogs tucked neat beneath the sky,
I nibble code and twitch with joy 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes the linked issue reference and main objective but lacks detail on specific changes and leaves all verification checkboxes unchecked. Complete the verification checklist by checking items off or adding notes, and optionally expand the description with details about specific component modifications.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: replacing a gitea popover with a dropdown menu, which aligns with the primary objective.
Linked Issues check ✅ Passed The code changes successfully replace the popover-based menu with a dropdown menu by refactoring ThreeDotsMenu component and related files to use StudioDropdown instead of StudioPopover.
Out of Scope Changes check ✅ Passed CSS module restructuring and component prop changes are directly related to the dropdown replacement objective; no unrelated changes detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 17063-replace-gitea--menu-with-dropdown-instead-of-popover

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ClonePopoverContent/ClonePopoverContent.module.css (1)

8-8: Prefer unitless zero for padding.

Using 0 without a unit is more idiomatic in CSS for zero values.

Apply this diff:

-  padding: 0%;
+  padding: 0;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fba224d and 1e205c9.

📒 Files selected for processing (9)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ClonePopoverContent/ClonePopoverContent.module.css (1 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.module.css (1 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.tsx (2 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.module.css (1 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx (1 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/index.ts (0 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.module.css (0 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.test.tsx (1 hunks)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx (3 hunks)
💤 Files with no reviewable changes (2)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/index.ts
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.module.css
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 0
File: :0-0
Timestamp: 2025-09-10T12:02:06.348Z
Learning: In the Altinn Studio repository, the team convention is to remove irrelevant checkboxes from the PR template description rather than leaving them unmarked. This makes it clear that the author has intentionally considered each item and removed non-applicable ones, helping to avoid merging PRs with incomplete checklists.
Learnt from: mirkoSekulic
Repo: Altinn/altinn-studio PR: 16095
File: src/App/app-template-dotnet/src/App/models/model.cs:10-29
Timestamp: 2025-08-15T05:53:32.529Z
Learning: When moving app templates in Altinn Studio, mirkoSekulic prefers to keep the PR scope strictly limited to the move operation itself, with all content changes (including code quality improvements, naming convention fixes, and attribute cleanup) deferred to separate PRs for better maintainability and atomic changes.
Learnt from: lassopicasso
Repo: Altinn/altinn-studio PR: 14575
File: frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/OverrideFields/Summary2OverrideDisplayType.tsx:47-58
Timestamp: 2025-02-07T09:50:33.290Z
Learning: Avoid suggesting StudioCombobox component in future PRs for the Altinn Studio repository. A new replacement component will be introduced later.
Learnt from: framitdavid
Repo: Altinn/altinn-studio PR: 16372
File: src/Designer/frontend/libs/studio-components/src/components/index.ts:34-34
Timestamp: 2025-09-23T08:53:19.508Z
Learning: In the Altinn Studio codebase, when moving components from studio-components-legacy to studio-components, the team prefers to handle the component migration and remaining import updates in separate PRs to maintain focused, atomic changes.
Learnt from: ErlingHauan
Repo: Altinn/altinn-studio PR: 15977
File: frontend/libs/studio-components-legacy/src/components/StudioCard/index.tsx:2-7
Timestamp: 2025-08-06T12:36:57.397Z
Learning: When a developer copies a component from `studio-components-legacy` to `studio-components` in the Altinn Studio repository and has not added a deprecation comment for the component in `studio-components-legacy`, suggest adding the deprecation comment in the PR review.
Learnt from: ErlingHauan
Repo: Altinn/altinn-studio PR: 15977
File: frontend/libs/studio-components-legacy/src/components/StudioCard/index.tsx:2-7
Timestamp: 2025-08-06T12:37:01.381Z
Learning: When reviewing PRs in the Altinn Studio repository where a developer copies a component from `studio-components-legacy` to `studio-components`, suggest adding a `deprecated` JSDoc comment to the component in `studio-components-legacy` if one hasn't been added. The deprecation comment should recommend using the component from `studio/components` instead.
Learnt from: mgunnerud
Repo: Altinn/altinn-studio PR: 16187
File: frontend/resourceadm/components/ResourcePageInputs/ResourceSwitchInput.tsx:3-3
Timestamp: 2025-08-25T13:55:27.042Z
Learning: In the Altinn Studio codebase, when migrating from studio/components-legacy to studio/components, PRs should focus only on components that have available replacements in the new package. Components without new implementations should remain in the legacy package until replacements are available, supporting an incremental migration approach.
Learnt from: Konrad-Simso
Repo: Altinn/altinn-studio PR: 14952
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/OptionListEditor/ManualOptionsEditor/ManualOptionsEditor.test.tsx:57-57
Timestamp: 2025-03-12T14:19:41.785Z
Learning: TODO comments in the codebase mentioning "Todo: Replace 'close modal' with defaultDialogProps.closeButtonTitle" will be addressed when upgrading to Designsystemet v1, which is currently being worked on.
Learnt from: Konrad-Simso
Repo: Altinn/altinn-studio PR: 14952
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/OptionListEditor/ManualOptionsEditor/ManualOptionsEditor.test.tsx:57-57
Timestamp: 2025-03-12T14:19:43.129Z
Learning: TODO comments in the codebase mentioning "Todo: Replace 'close modal' with defaultDialogProps.closeButtonTitle" will be addressed when upgrading to Designsystemet v1, which is currently being worked on.
Learnt from: mlqn
Repo: Altinn/altinn-studio PR: 15495
File: frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx:0-0
Timestamp: 2025-06-04T06:37:16.617Z
Learning: In the OutdatedVersionAlertRemindChoiceDialog component in frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx, the onOpen handler uses `setOpened(!opened)` to toggle the popover state. This is expected behavior where the trigger button serves as both an open and close control for the popover.
Learnt from: JamalAlabdullah
Repo: Altinn/altinn-studio PR: 16474
File: src/Designer/frontend/libs/studio-components/src/components/StudioIconCard/StudioIconCard.tsx:38-47
Timestamp: 2025-09-30T21:12:14.088Z
Learning: In the StudioPopover component within studio-components (DS V1), the `size` prop is no longer used. Instead, size is controlled via the `data-size` attribute (e.g., `data-size='sm'`).
📚 Learning: 2025-08-12T13:45:39.680Z
Learnt from: ErlingHauan
Repo: Altinn/altinn-studio PR: 16081
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/OptionListSelector/OptionListSelector.tsx:108-115
Timestamp: 2025-08-12T13:45:39.680Z
Learning: The StudioButton component from studio/components-legacy defaults to type="button", so explicit type attributes are not needed to prevent form submission behavior.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.tsx
📚 Learning: 2025-11-25T08:21:14.748Z
Learnt from: CR
Repo: Altinn/altinn-studio PR: 0
File: src/App/frontend/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:21:14.748Z
Learning: Applies to src/App/frontend/**/*.module.css : Use CSS Modules for component styling with `.module.css` file extension

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.module.css
📚 Learning: 2025-10-26T21:09:38.402Z
Learnt from: JamalAlabdullah
Repo: Altinn/altinn-studio PR: 16742
File: src/Designer/frontend/packages/schema-editor/src/components/SchemaInspector/ItemDataComponent.module.css:23-25
Timestamp: 2025-10-26T21:09:38.402Z
Learning: In the Altinn Studio codebase, the design system is migrating from `--fds-*` prefixed CSS variables to `--ds-*` prefixed variables. The `--fds-*` prefix will be removed in the future, so usage of `--ds-*` variables (like `--ds-size-4`) alongside existing `--fds-*` variables (like `--fds-spacing-4`) in the same file is intentional during this transition period.
<!--

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.module.css
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ClonePopoverContent/ClonePopoverContent.module.css
📚 Learning: 2025-03-12T14:19:43.129Z
Learnt from: Konrad-Simso
Repo: Altinn/altinn-studio PR: 14952
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/OptionListEditor/ManualOptionsEditor/ManualOptionsEditor.test.tsx:57-57
Timestamp: 2025-03-12T14:19:43.129Z
Learning: TODO comments in the codebase mentioning "Todo: Replace 'close modal' with defaultDialogProps.closeButtonTitle" will be addressed when upgrading to Designsystemet v1, which is currently being worked on.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.module.css
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx
📚 Learning: 2025-11-25T08:21:14.748Z
Learnt from: CR
Repo: Altinn/altinn-studio PR: 0
File: src/App/frontend/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:21:14.748Z
Learning: Applies to src/App/frontend/**/*.{ts,tsx} : Leverage Digdir Design System components when possible instead of creating custom implementations

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx
📚 Learning: 2025-06-04T06:37:16.617Z
Learnt from: mlqn
Repo: Altinn/altinn-studio PR: 15495
File: frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx:0-0
Timestamp: 2025-06-04T06:37:16.617Z
Learning: In the OutdatedVersionAlertRemindChoiceDialog component in frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx, the onOpen handler uses `setOpened(!opened)` to toggle the popover state. This is expected behavior where the trigger button serves as both an open and close control for the popover.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx
📚 Learning: 2025-01-23T14:49:32.407Z
Learnt from: framitdavid
Repo: Altinn/altinn-studio PR: 14494
File: frontend/app-development/features/appPublish/components/UndeployConsequenceDialog/UndeployConsequenceDialog.tsx:21-27
Timestamp: 2025-01-23T14:49:32.407Z
Learning: The StudioModal component from studio/components already includes built-in support for dialog close handling, keyboard interaction (Esc key), and focus trap for accessibility.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx
📚 Learning: 2025-06-16T12:39:14.951Z
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 15659
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/CodeListDialog/CodeListDialog.test.tsx:146-149
Timestamp: 2025-06-16T12:39:14.951Z
Learning: The Altinn Studio project has HTMLDialogElement polyfills already configured in frontend/testing/setupTests.ts that mock showModal() to set this.open = true and close() to set this.open = false, so showModal() works correctly in Jest/JSDOM tests without needing additional polyfills.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx
📚 Learning: 2025-10-29T07:11:59.228Z
Learnt from: JamalAlabdullah
Repo: Altinn/altinn-studio PR: 16787
File: src/Designer/frontend/packages/ux-editor/src/components/config/editModal/EditImage/LocalImage/PreviewImageSummary/DeleteOptionsModal/DeleteOptionsModal.tsx:18-30
Timestamp: 2025-10-29T07:11:59.228Z
Learning: The StudioDialog component from studio/components includes built-in support for dialog close handling, with a close button in the header and keyboard interaction (Esc key) for accessibility.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx
🧬 Code graph analysis (2)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx (2)
src/Designer/frontend/libs/studio-components/src/components/StudioDropdown/StudioDropdown.tsx (1)
  • StudioDropdown (22-65)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx (1)
  • LocalChangesModal (9-29)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx (2)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/index.ts (1)
  • LocalChangesModal (1-1)
src/Designer/frontend/libs/studio-components-legacy/src/components/StudioButton/StudioButton.tsx (1)
  • StudioButton (89-89)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build environment and run e2e test
  • GitHub Check: CodeQL
  • GitHub Check: Testing
  • GitHub Check: Typechecking and linting
🔇 Additional comments (8)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.test.tsx (1)

72-72: LGTM!

The test correctly reflects the structural change where the repository navigation is now a button within a dropdown instead of a link.

src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.tsx (1)

98-98: LGTM!

The CSS module integration is correct, and the className bindings align with the new styling approach introduced in this refactor.

Also applies to: 108-108

src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.module.css (1)

1-20: LGTM!

The CSS module correctly styles the modal using the new design system variables (--ds-*), and the selectors align with the StudioDialog component structure.

src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesActionButton/LocalChangesActionButton.module.css (1)

10-16: LGTM!

The new styling classes are straightforward and correctly applied in LocalChangesActionButton.tsx.

src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx (3)

21-23: LGTM!

The handleClick function correctly opens the repository in a new tab with appropriate security flags ('noopener,noreferrer').


55-55: I encountered a technical issue attempting to clone the repository, which prevents me from verifying the LocalChangesModal usages across the codebase. Without access to the repository, I cannot:

  1. Confirm all usages of LocalChangesModal have been updated to the new API
  2. Verify the component definition and prop changes
  3. Identify any remaining incompatible usage patterns

Verify that all usages of LocalChangesModal have been updated to match the new API (no props).

LocalChangesModal no longer accepts props (previously accepted triggerClassName). All usages across the codebase need to be updated to match this breaking change.


34-47: Nested popover pattern in dropdown appears to be intentional design; verification inconclusive.

The nested StudioPopover.TriggerContext inside StudioDropdown.Item (lines 34–47) is unique in the codebase—no other files use this pattern. Both components are thin wrappers around @digdir/designsystemet-react libraries with no built-in restrictions on nesting. The pattern serves a valid use case: the clone action requires complex popover content (ClonePopoverContent) that shouldn't close the dropdown when triggered.

However, since this pattern appears nowhere else in the codebase and lacks explicit test coverage, the concern about event handling and focus management compatibility remains unverifiable through code review alone. The underlying libraries should support this, but without runtime testing or designsystemet-react documentation explicitly covering nested popovers within dropdowns, potential edge cases cannot be ruled out.

src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/LocalChangesModal/LocalChangesModal.tsx (1)

7-20: LGTM with breaking API change noted.

The component has been simplified by removing the LocalChangesModalProps interface and integrating CSS modules for styling. The triggerClassName prop has been removed (line 16), and the component now uses internal CSS classes (lines 19-20). This is a breaking change that has already been flagged for verification in ThreeDotsMenu.tsx.

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.17%. Comparing base (f63ea9c) to head (c6cd38a).
⚠️ Report is 413 commits behind head on main.

Files with missing lines Patch % Lines
...onents/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17076      +/-   ##
==========================================
- Coverage   96.19%   96.17%   -0.03%     
==========================================
  Files        2447     2378      -69     
  Lines       30790    30268     -522     
  Branches     3544     3487      -57     
==========================================
- Hits        29618    29109     -509     
+ Misses        864      846      -18     
- Partials      308      313       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot added the quality/testing Tests that are missing, needs to be created or could be improved. label Nov 27, 2025
@JamalAlabdullah JamalAlabdullah moved this to 🔎 In review in Team Altinn Studio Nov 27, 2025
@JamalAlabdullah JamalAlabdullah added the squad/utforming Issues that belongs to the named squad. label Nov 27, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx (1)

21-23: Navigation now uses window.location.href – check intended UX

Using window.location.href = repositoryPath(owner, repoName) from a dropdown button is functionally fine, but it changes the interaction from a link to a button-driven navigation: users can no longer use standard browser affordances like “open in new tab” or “copy link address” on the repository entry. If that regression is not intended, consider wiring the URL through a link-style component or an href/asChild pattern on StudioDropdown.Button (if supported) so you keep native link behaviour.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 080f121 and c6cd38a.

📒 Files selected for processing (1)
  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx (3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: framitdavid
Repo: Altinn/altinn-studio PR: 16372
File: src/Designer/frontend/libs/studio-components/src/components/index.ts:34-34
Timestamp: 2025-09-23T08:53:19.508Z
Learning: In the Altinn Studio codebase, when moving components from studio-components-legacy to studio-components, the team prefers to handle the component migration and remaining import updates in separate PRs to maintain focused, atomic changes.
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 0
File: :0-0
Timestamp: 2025-09-10T12:02:06.348Z
Learning: In the Altinn Studio repository, the team convention is to remove irrelevant checkboxes from the PR template description rather than leaving them unmarked. This makes it clear that the author has intentionally considered each item and removed non-applicable ones, helping to avoid merging PRs with incomplete checklists.
Learnt from: mirkoSekulic
Repo: Altinn/altinn-studio PR: 16095
File: src/App/app-template-dotnet/src/App/models/model.cs:10-29
Timestamp: 2025-08-15T05:53:32.529Z
Learning: When moving app templates in Altinn Studio, mirkoSekulic prefers to keep the PR scope strictly limited to the move operation itself, with all content changes (including code quality improvements, naming convention fixes, and attribute cleanup) deferred to separate PRs for better maintainability and atomic changes.
Learnt from: Konrad-Simso
Repo: Altinn/altinn-studio PR: 14952
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/OptionListEditor/ManualOptionsEditor/ManualOptionsEditor.test.tsx:57-57
Timestamp: 2025-03-12T14:19:41.785Z
Learning: TODO comments in the codebase mentioning "Todo: Replace 'close modal' with defaultDialogProps.closeButtonTitle" will be addressed when upgrading to Designsystemet v1, which is currently being worked on.
Learnt from: Konrad-Simso
Repo: Altinn/altinn-studio PR: 14952
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/OptionListEditor/ManualOptionsEditor/ManualOptionsEditor.test.tsx:57-57
Timestamp: 2025-03-12T14:19:43.129Z
Learning: TODO comments in the codebase mentioning "Todo: Replace 'close modal' with defaultDialogProps.closeButtonTitle" will be addressed when upgrading to Designsystemet v1, which is currently being worked on.
Learnt from: JamalAlabdullah
Repo: Altinn/altinn-studio PR: 16474
File: src/Designer/frontend/libs/studio-components/src/components/StudioIconCard/StudioIconCard.tsx:38-47
Timestamp: 2025-09-30T21:12:14.088Z
Learning: In the StudioPopover component within studio-components (DS V1), the `size` prop is no longer used. Instead, size is controlled via the `data-size` attribute (e.g., `data-size='sm'`).
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 15659
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/CodeListDialog/CodeListDialog.test.tsx:146-149
Timestamp: 2025-06-16T12:39:14.951Z
Learning: The Altinn Studio project already has HTMLDialogElement polyfills configured in their test setup (frontend/testing/setupTests.ts), so showModal() and close() methods work correctly in Jest/JSDOM tests without needing additional polyfills.
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 15659
File: frontend/packages/ux-editor/src/components/config/editModal/EditOptions/OptionTabs/EditTab/CodeListDialog/CodeListDialog.test.tsx:146-149
Timestamp: 2025-06-16T12:39:14.951Z
Learning: The Altinn Studio project has HTMLDialogElement polyfills already configured in frontend/testing/setupTests.ts that mock showModal() to set this.open = true and close() to set this.open = false, so showModal() works correctly in Jest/JSDOM tests without needing additional polyfills.
Learnt from: mlqn
Repo: Altinn/altinn-studio PR: 15495
File: frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx:0-0
Timestamp: 2025-06-04T06:37:16.617Z
Learning: In the OutdatedVersionAlertRemindChoiceDialog component in frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx, the onOpen handler uses `setOpened(!opened)` to toggle the popover state. This is expected behavior where the trigger button serves as both an open and close control for the popover.
Learnt from: JamalAlabdullah
Repo: Altinn/altinn-studio PR: 16787
File: src/Designer/frontend/packages/ux-editor-v3/src/components/toolbar/RuleModal.test.tsx:70-70
Timestamp: 2025-10-28T20:54:18.494Z
Learning: Test inconsistencies in the ux-editor-v3 package do not need to be fixed, as indicated by the maintainer for the file `src/Designer/frontend/packages/ux-editor-v3/src/components/toolbar/RuleModal.test.tsx`.
📚 Learning: 2025-11-25T08:21:14.748Z
Learnt from: CR
Repo: Altinn/altinn-studio PR: 0
File: src/App/frontend/CLAUDE.md:0-0
Timestamp: 2025-11-25T08:21:14.748Z
Learning: Applies to src/App/frontend/**/*.{ts,tsx} : Leverage Digdir Design System components when possible instead of creating custom implementations

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx
📚 Learning: 2025-08-12T05:59:20.146Z
Learnt from: TomasEng
Repo: Altinn/altinn-studio PR: 16064
File: frontend/libs/studio-components/src/components/StudioCheckboxGroup/StudioGetCheckboxProps.ts:1-1
Timestamp: 2025-08-12T05:59:20.146Z
Learning: In the Altinn Studio codebase, deep exports from digdir/designsystemet-react should be avoided. The team prefers using shared wrappers for design system imports to prevent breakage from upstream internal path changes, but such refactoring should be done in separate PRs to maintain focused scope.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx
📚 Learning: 2025-06-04T06:37:16.617Z
Learnt from: mlqn
Repo: Altinn/altinn-studio PR: 15495
File: frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx:0-0
Timestamp: 2025-06-04T06:37:16.617Z
Learning: In the OutdatedVersionAlertRemindChoiceDialog component in frontend/app-development/layout/VersionAlerts/OutdatedVersionAlertRemindChoiceDialog.tsx, the onOpen handler uses `setOpened(!opened)` to toggle the popover state. This is expected behavior where the trigger button serves as both an open and close control for the popover.

Applied to files:

  • src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx
🔇 Additional comments (2)
src/Designer/frontend/packages/shared/src/components/GiteaHeader/ThreeDotsMenu/ThreeDotsMenu.tsx (2)

5-5: StudioDropdown/StudioPopover wrapper import looks correct

Importing StudioDropdown and StudioPopover from @studio/components follows the pattern of using shared wrappers instead of deep design system paths, and keeps this component aligned with the rest of Studio. No issues here.

As per coding guidelines, this avoids fragile deep imports.


26-58: Dropdown composition with clone popover and local-changes modal looks solid

The move to StudioDropdown with an icon trigger, aria label, and light colour scheme looks good, and embedding the clone action as a StudioPopover inside a StudioDropdown.Item preserves the previous toggle behaviour while keeping the clone UI scoped behind isClonePossible. Likewise, placing LocalChangesModal in its own dropdown item keeps the menu structure clear. I don’t see any obvious state or accessibility pitfalls in this composition, assuming the underlying Studio components handle focus/closing as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/version-control Area: Related to version control for files in apps. frontend quality/testing Tests that are missing, needs to be created or could be improved. skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer squad/utforming Issues that belongs to the named squad.

Projects

Status: 🔎 In review

Development

Successfully merging this pull request may close these issues.

Replace gitea- menu with dropdown instead of popover.

1 participant