Skip to content

feat: Update Sharing modal look#2981

Merged
doubleface merged 3 commits intomasterfrom
feat/folderSharingModalSmallChanges
Apr 2, 2026
Merged

feat: Update Sharing modal look#2981
doubleface merged 3 commits intomasterfrom
feat/folderSharingModalSmallChanges

Conversation

@doubleface
Copy link
Copy Markdown
Contributor

@doubleface doubleface commented Apr 2, 2026

  • update french translation with more appropriate vocabulary
  • hide read / write editing in link edition modale to avoid two paths for the same action
  • update the look of the link to link edition modale
image image

Summary by CodeRabbit

  • Localization

    • Updated French translations for share permission labels and link sharing options.
  • UI Improvements

    • Refined button styling in share link settings with improved visual hierarchy.

doubleface added 3 commits April 2, 2026 11:32
When federated shared folders are activated
Since we can now edit it directly in the sharing modal
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

Walkthrough

This pull request updates French localization strings for share permissions, refactors the LinkRecipient component's UI by replacing a DropdownButton with a ghost-variant Button featuring a Gear icon, and modifies the BoxEditingRights component to conditionally render its trigger UI based on the drive.federated-shared-folder.enabled feature flag. The changes affect localization, component styling, and feature flag-based visibility.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: Update Sharing modal look' accurately reflects the main objective of updating the visual appearance and behavior of sharing modals, covering all three key changes: French translation updates, link recipient button styling, and conditional visibility of editing controls.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/folderSharingModalSmallChanges

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
Copy Markdown

@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.

🧹 Nitpick comments (1)
packages/cozy-sharing/src/components/ShareRestrictionModal/BoxEditingRights.jsx (1)

56-79: Gate ActionsMenu with the same feature flag as the trigger.

When the trigger is hidden, keeping ActionsMenu mounted creates an orphaned interaction path and extra work. Render both under the same condition.

♻️ Proposed refactor
+  const showEditingRightsSelector = !flag('drive.federated-shared-folder.enabled')
+
   return (
     <>
-      {!flag('drive.federated-shared-folder.enabled') && (
-        <Box
-          borderRadius="0.5rem"
-          border="1px solid var(--borderMainColor)"
-          ref={buttonRef}
-        >
-          <List className="u-p-0">
-            <ListItem
-              button
-              size="large"
-              ellipsis={false}
-              onClick={toggleMenuDisplayed}
-            >
-              <ListItemIcon>
-                <Icon icon={PeopleIcon} />
-              </ListItemIcon>
-              <ListItemText primary={textPrimary} secondary={textSecondary} />
-              <ListItemIcon className="u-mr-half">
-                <Icon icon={BottomIcon} />
-              </ListItemIcon>
-            </ListItem>
-          </List>
-        </Box>
-      )}
-
-      <ActionsMenu
-        ref={buttonRef}
-        open={isMenuDisplayed}
-        docs={[file]}
-        actions={actions}
-        autoClose
-        onClose={toggleMenuDisplayed}
-      />
+      {showEditingRightsSelector && (
+        <>
+          <Box
+            borderRadius="0.5rem"
+            border="1px solid var(--borderMainColor)"
+            ref={buttonRef}
+          >
+            <List className="u-p-0">
+              <ListItem
+                button
+                size="large"
+                ellipsis={false}
+                onClick={toggleMenuDisplayed}
+              >
+                <ListItemIcon>
+                  <Icon icon={PeopleIcon} />
+                </ListItemIcon>
+                <ListItemText primary={textPrimary} secondary={textSecondary} />
+                <ListItemIcon className="u-mr-half">
+                  <Icon icon={BottomIcon} />
+                </ListItemIcon>
+              </ListItem>
+            </List>
+          </Box>
+
+          <ActionsMenu
+            ref={buttonRef}
+            open={isMenuDisplayed}
+            docs={[file]}
+            actions={actions}
+            autoClose
+            onClose={toggleMenuDisplayed}
+          />
+        </>
+      )}
     </>
   )

Based on learnings, in federated-folder sharing the UI should avoid exposing unsupported sharing-management paths.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/cozy-sharing/src/components/ShareRestrictionModal/BoxEditingRights.jsx`
around lines 56 - 79, The ActionsMenu must be rendered only when the trigger is
visible: wrap the ActionsMenu component with the same feature-flag condition
used for the trigger (flag('drive.federated-shared-folder.enabled')) or move
ActionsMenu inside the same conditional block so it is mounted/unmounted
together with the Box/List trigger; ensure any props or refs it expects (e.g.,
buttonRef, toggleMenuDisplayed) are passed through after the move so
toggleMenuDisplayed and ActionsMenu remain wired correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@packages/cozy-sharing/src/components/ShareRestrictionModal/BoxEditingRights.jsx`:
- Around line 56-79: The ActionsMenu must be rendered only when the trigger is
visible: wrap the ActionsMenu component with the same feature-flag condition
used for the trigger (flag('drive.federated-shared-folder.enabled')) or move
ActionsMenu inside the same conditional block so it is mounted/unmounted
together with the Box/List trigger; ensure any props or refs it expects (e.g.,
buttonRef, toggleMenuDisplayed) are passed through after the move so
toggleMenuDisplayed and ActionsMenu remain wired correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6a33e19a-6d57-45a3-a03a-bbd817b40630

📥 Commits

Reviewing files that changed from the base of the PR and between b098564 and ea5330f.

📒 Files selected for processing (3)
  • packages/cozy-sharing/locales/fr.json
  • packages/cozy-sharing/src/components/Recipient/LinkRecipient.jsx
  • packages/cozy-sharing/src/components/ShareRestrictionModal/BoxEditingRights.jsx

@doubleface doubleface merged commit cc29e55 into master Apr 2, 2026
3 checks passed
@doubleface doubleface deleted the feat/folderSharingModalSmallChanges branch April 2, 2026 13:26
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.

2 participants