Skip to content

Conversation

@lethemanh
Copy link
Contributor

@lethemanh lethemanh commented Jan 30, 2026

Changes:

This PR resolves the issue of new UI of file viewer:

  1. Display Details all the time

Need:

linagora/cozy-libs#2922

Result:

Screen.Recording.2026-01-30.at.21.27.22.mov

Summary by CodeRabbit

  • Refactor

    • Simplified the logic controlling the detail panel and changed how the panel is triggered to a counter-based update.
  • Chores

    • Updated a viewer dependency to a newer patch version.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

The changes modify the detail panel trigger mechanism in src/modules/actions/details.jsx. The displayCondition() function is simplified to check only the feature flag instead of requiring both the feature flag and location.state.showDetailPanel === false. The action handler now updates location.state by incrementing triggerDetailPanelTime (preserving other state via ...location.state) instead of setting showDetailPanel to true. package.json updates cozy-viewer from ^26.6.1 to ^26.6.4.

Possibly related PRs

Suggested reviewers

  • JF-Cozy
  • zatteo
  • rezk2ll
🚥 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 title accurately describes the main changes in the pull request - fixing file viewer UI issues by adjusting the details panel display logic and updating the cozy-viewer dependency.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-file-viewer-ui

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.

@bundlemon
Copy link

bundlemon bot commented Jan 30, 2026

BundleMon

Files updated (2)
Status Path Size Limits
static/js/cozy.(hash).js
805.02KB (+784B +0.1%) -
public/static/js/cozy.(hash).js
670.2KB (+744B +0.11%) -
Unchanged files (19)
Status Path Size Limits
static/js/(chunkId).(hash).js
1.05MB -
public/static/js/(chunkId).(hash).js
1015.4KB -
(hash).js
336.11KB -
public/(hash).js
336.11KB -
services/qualificationMigration.js
282.2KB -
services/dacc.js
262.06KB -
static/js/main.(hash).js
163.94KB -
public/static/js/public.(hash).js
136.66KB -
public/static/js/lib-react.(hash).js
39.24KB -
static/js/lib-react.(hash).js
39.24KB -
public/static/css/cozy.(hash).css
33.89KB -
static/css/cozy.(hash).css
33.89KB -
public/static/js/lib-router.(hash).js
21.86KB -
static/js/lib-router.(hash).js
21.86KB -
static/css/main.(hash).css
16.94KB -
public/static/css/public.(hash).css
6.66KB -
manifest.webapp
3.04KB -
index.html
687B -
assets/manifest.json
185B -

Total files change +1.5KB +0.03%

Groups updated (1)
Status Path Size Limits
**/*.js
6.97MB (+2.23KB +0.03%) -
Unchanged groups (2)
Status Path Size Limits
**/*.{png,svg,ico}
2.19MB -
**/*.css
128.53KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@lethemanh lethemanh merged commit 2594328 into master Feb 2, 2026
5 checks passed
@lethemanh lethemanh deleted the fix-file-viewer-ui branch February 2, 2026 15:51
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