Skip to content

feat: add close button to file viewer for improved navigation#2401

Merged
SgtPooki merged 6 commits intoipfs:mainfrom
alikhere:feat/close-file-button
Aug 25, 2025
Merged

feat: add close button to file viewer for improved navigation#2401
SgtPooki merged 6 commits intoipfs:mainfrom
alikhere:feat/close-file-button

Conversation

@alikhere
Copy link
Contributor

Closes #2400

Summary
Adds a close button (X icon) to the file viewer in the top-right , allowing users to close opened files and return to the files list.

Changes

  • Added close button with X icon
  • Implemented click handler to return to files list view

Additional context

2025-08-17.21-05-05.mp4

@alikhere alikhere requested a review from a team as a code owner August 17, 2025 16:23
@welcome
Copy link

welcome bot commented Aug 17, 2025

Thank you for submitting this PR!
A maintainer will be here shortly to review it.
We are super grateful, but we are also overloaded! Help us by making sure that:

  • The context for this PR is clear, with relevant discussion, decisions
    and stakeholders linked/mentioned.

  • Your contribution itself is clear (code comments, self-review for the
    rest) and in its best form. Follow the code contribution
    guidelines

    if they apply.

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
Next steps:

  • A maintainer will triage and assign priority to this PR, commenting on
    any missing things and potentially assigning a reviewer for high
    priority items.

  • The PR gets reviews, discussed and approvals as needed.

  • The PR is merged by maintainers when it has been approved and comments addressed.

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution.
We are very grateful for your contribution!

@alikhere
Copy link
Contributor Author

alikhere commented Aug 17, 2025

@SgtPooki @lidel Could you please review the issue and PR

@SgtPooki
Copy link
Member

Thanks so much for the PR and the ping. looks good in your demo and when testing locally.

When there is a very long name, the X isn't shown:

image

^ There is an existing bug (#2405) where long names aren't truncated like they should be.. they should not cause horizontal scrolling. Not a fault in this PR, just something i noticed.

and i noticed a one other bug thanks to how simple this little button makes it to toggle back and forth =)

let me check out the code now

Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

code looks okay.. i'll push up a fix for the parentPath issue

@SgtPooki
Copy link
Member

@alikhere give the changes a run locally and let me know what you think. Also check out the code i added to make sure it makes sense.

@alikhere
Copy link
Contributor Author

@alikhere give the changes a run locally and let me know what you think. Also check out the code i added to make sure it makes sense.

@SgtPooki Thanks, I’ve applied the changes and tested it locally — works fine.

@SgtPooki SgtPooki merged commit 84969a5 into ipfs:main Aug 25, 2025
20 checks passed
@alikhere alikhere deleted the feat/close-file-button branch August 25, 2025 13:52
ipfs-gui-bot pushed a commit that referenced this pull request Sep 17, 2025
## [4.9.0](v4.8.0...v4.9.0) (2025-09-17)

 CID `bafybeietkqxghs3hm56e3w64s4papqlvvzqzjigs4eyuy24plkpz652fee`

 ---

### Features

* add Agent Version column to peers table ([#2433](#2433)) ([614f30d](614f30d)), closes [ipfs/kubo#9465](ipfs/kubo#9465) [ipfs/js-kubo-rpc-client#342](ipfs/js-kubo-rpc-client#342) [ipfs/kubo#9465](ipfs/kubo#9465)
* add close button to file viewer for improved navigation ([#2401](#2401)) ([84969a5](84969a5))
* add diagnostics screen ([#2392](#2392)) ([f3a8179](f3a8179)), closes [#2424](#2424) [ipfs-check#102](ipfs/ipfs-check#102) [/github.com/ipfs/ipfs-check/pull/102#pullrequestreview-3214396503](https://github.com/ipfs//github.com/ipfs/ipfs-check/pull/102/issues/pullrequestreview-3214396503) [#2434](#2434)
* **files:** advanced sorting options ([#2421](#2421)) ([c9251eb](c9251eb))
* migrate Tooltip from Javascript to Typescript ([#2381](#2381)) ([dc9e9ac](dc9e9ac))

### Bug Fixes

* create redux-bundler migration helpers ([#2388](#2388)) ([d1fdb87](d1fdb87))
* display UX friendly error for missing files ([#2346](#2346)) ([d4e7fca](d4e7fca))
* **files:** rename in Grid View ([#2422](#2422)) ([e39bce6](e39bce6))
* **i18n:** prevent English replacements in translation sync workflow ([#2418](#2418)) ([323c59e](323c59e))
* macos input focus issue in draggable regions ([#2416](#2416)) ([5382688](5382688))
* migrate error boundary to typescript ([#2402](#2402)) ([b33775a](b33775a))
* **navbar:**  highlighting on browser back ([#2425](#2425)) ([cec6dfd](cec6dfd))
* Prevent layout breaks with long filenames in file preview ([#2415](#2415)) ([f82efcd](f82efcd))
* reference to `global` in browser environment ([#2408](#2408)) ([03b2e92](03b2e92))
* shared max for bandwidth chart ([#2426](#2426)) ([cd17032](cd17032))
* typecheck more files ([#2409](#2409)) ([fb967ee](fb967ee))

### Tests

* fix bring-your-own kubo node functionality ([#2396](#2396)) ([0883cfa](0883cfa))
* make e2e tests more robust ([#2438](#2438)) ([3de544b](3de544b))

### Trivial Changes

* **readme:** update links ([dc6f8f4](dc6f8f4))
* remove selectApiUrl selector ([#2412](#2412)) ([d4710e8](d4710e8))
@ipfs-gui-bot
Copy link
Collaborator

🎉 This PR is included in version 4.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "Close File" button in Files section

3 participants