Skip to content

Add context menu to text fields and Selectable Text widget - #1815

Merged
jackpot51 merged 2 commits into
pop-os:masterfrom
hojjatabdollahi:hojjat/update-libcosmic
Aug 18, 2026
Merged

jackpot51 merged 2 commits into
pop-os:masterfrom
hojjatabdollahi:hojjat/update-libcosmic

Conversation

@hojjatabdollahi

@hojjatabdollahi hojjatabdollahi commented May 21, 2026 •

Copy link
Copy Markdown
Contributor
  • Adds context menu to text input fields
  • Adds selectable text to context drawer, but only to file name, created/modified/accessed date. I'm sure more places could use the selectable text.
  • Also pulls the latest changes in Iced and libcosmic that removes "redraw on any message", which means moving the cursor doesn't automatically call a redraw, widgets need to ask for it. I have found all places that previously was working normally because we were redrawing almost unconditionally. But it is possible that a custom widget somewhere still isn't asking for a redraw explicitly when its state changes. So, for QA I'd keep an eye on that.

Depends on:

recording-2026-06-29_18-20-42-trimmed.mp4

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch from eb601ed to 8ff9dd8 Compare June 9, 2026 17:52
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch from 8ff9dd8 to b4b8b87 Compare June 30, 2026 00:18
@hojjatabdollahi hojjatabdollahi changed the title chore: update libcosmic Add context menu to text fields and Selectable Text widget Jun 30, 2026
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch from b4b8b87 to 6e53cec Compare July 1, 2026 20:05
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch 3 times, most recently from ff07f97 to d5431c5 Compare August 10, 2026 15:42
@hojjatabdollahi
hojjatabdollahi marked this pull request as ready for review August 10, 2026 15:43
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch from d5431c5 to 610c2c6 Compare August 10, 2026 16:25
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch 2 times, most recently from 96d023d to c2db359 Compare August 10, 2026 19:58
@hojjatabdollahi
hojjatabdollahi force-pushed the hojjat/update-libcosmic branch from c2db359 to 78ac96c Compare August 17, 2026 17:17
@mmstick
mmstick requested review from a team August 17, 2026 17:22
@jacobktm jacobktm self-assigned this Aug 17, 2026

@jacobktm jacobktm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This has passed regression testing. # Testing

This document provides a regression testing checklist for COSMIC Files. The checklist provides a starting point for Quality Assurance reviews.

Checklist

Basic navigation

  • Middle-click opens directory in a new tab (not focused).
  • Open two scrollable tabs. Scroll one tab, then switch to the other tab; it should not have scrolled.
  • Hover over the top item in the folder, then scroll down until it's out of view (while still hovered).
    On scrolling back up (with the mouse in a different position), the item should not have the hover highlight.
  • Right-click an item in the sidebar. No visual change should occur with the rest of the items.
  • Remove an item from the sidebar, then re-pin it.

File operations

  • Right-click -> Create a new folder, then enter it.
  • Right-click in the empty folder -> Create a new file.
  • Navigate to the parent folder, create another new file, then drag it into the created folder.
  • Files can be renamed.
  • Files can be opened with non-default apps & browsing store for new apps works.
  • Normal right-click shows Move to trash option.
  • Shift right-click, and right-click followed by Shift, both show Permanently delete option.

Advanced navigation & view settings

  • Image and video thumbnails generate & display in local folders.
  • Gallery preview shows with Spacebar.
  • Details pane shows with Ctrl+Spacebar.
  • Zoom in/out and reset to default zoom work.
  • Ctrl+1 and Ctrl+2 switch between list and icon view.
  • Ctrl+H shows/hides hidden files.
  • Directories can be sorted at top or inline.
  • Settings -> Theme works.
  • Settings -> Type to Search affects behavior as designed.
  • Single-click to open setting takes effect.
  • Sorting options work.
  • Cutting, copying, and pasting files works.
  • F5 reloads current directory.
  • Left sidebar can be collapsed and expanded.

External filesystems

  • Add a network drive (e.g. SFTP) and navigate into it.
  • Plug in a USB drive; able to mount, browse, and eject.

Integrations

  • Desktop icons display as expected
  • Drag-and-drop into Firefox works

Context menus in text fields also works well, this looks good.

@jackpot51
jackpot51 merged commit 6e210a3 into pop-os:master Aug 18, 2026
3 of 4 checks passed
jackpot51 added a commit to pop-os/cosmic-term that referenced this pull request Aug 18, 2026
Selection changes, scrolling and hyperlink highlights all just flag the
terminal as dirty. Without asking for a redraw they would not show up
until something else happens to repaint the window. This becomes a
problem after iced PR below gets merged.


Depends on 
- [x] pop-os/iced#377
- [x] pop-os/libcosmic#1382
- [x] pop-os/libcosmic#1388
- [x] pop-os/cosmic-files#1815

____
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
jackpot51 added a commit to pop-os/cosmic-edit that referenced this pull request Aug 18, 2026
)

Depends on 
- [x] pop-os/iced#377
- [x] pop-os/libcosmic#1382
- [x] pop-os/libcosmic#1387
- [x] pop-os/cosmic-files#1815



This pulls the changes in Iced and libcosmic that removes "redraw on any
message", which means moving the cursor doesn't automatically call a
redraw, widgets need to ask for it. I have found all places that
previously was working normally because we were redrawing almost
unconditionally. But it is possible that a custom widget somewhere still
isn't asking for a redraw explicitly when its state changes. So, for QA
I'd keep an eye on that.

For example I found that moving the cursor to middle of a word and
pressing delete doesn't redraw, because we only redraw if the cursor
changes position. Or pressing ctrl+a and then backspace doesn't redraw
for the same reason. Or double-click to select a text wasn't drawing the
selection. I have fixed those, but just examples for the QA team to
check.

Demo:


https://github.com/user-attachments/assets/5e5940a8-fd89-498a-8670-85d540fcaa72


___
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
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