Skip to content

feat(gui:list): allow copying package-names#1377

Open
lawson85 wants to merge 12 commits into
Universal-Debloater-Alliance:mainfrom
lawson85:main
Open

feat(gui:list): allow copying package-names#1377
lawson85 wants to merge 12 commits into
Universal-Debloater-Alliance:mainfrom
lawson85:main

Conversation

@lawson85
Copy link
Copy Markdown
Contributor

@lawson85 lawson85 commented Apr 6, 2026

Description

I have made it so that you can copy package names, if you select it or double click and use CTRL + C

Related issues

closes #1304

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have performed a self-review of my changes
  • My changes generate no new warnings
  • The CI/CD pipeline passes (or is expected to pass)

@AnonymousWP AnonymousWP requested a review from a team April 7, 2026 07:35
@AnonymousWP AnonymousWP added the enhancement New feature or request label Apr 7, 2026
@AnonymousWP AnonymousWP changed the title Make package names copyable feat(gui): allow copying package-names Apr 7, 2026
Comment thread src/gui/widgets/package_row.rs
@Rudxain Rudxain changed the title feat(gui): allow copying package-names feat(gui:list): allow copying package-names Apr 7, 2026
@Rudxain Rudxain added UI Related to the UI rust Pull requests that update rust code labels Apr 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for copying package names from the GUI package list by making the displayed package name selectable/copyable.

Changes:

  • Replace the package-name label in each package row with an iced text_input so users can select and copy it.
  • Add a Noop row message and handle it in the list view to ignore edits from the text_input.
  • Minor import adjustments to support the new message handling.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/gui/widgets/package_row.rs Makes the package name render as a text_input and introduces Message::Noop.
src/gui/views/list.rs Handles the new Noop message when processing row messages (and adds an extra alias import).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 123 to +132
row![
button(
row![
selection_checkbox,
text(&self.name).width(Length::FillPortion(8)),
// Allows the packagename text to be copyable
text_input("", &self.name)
.on_input(|_| Message::Noop)
.padding(0)
.size(14)
.width(Length::FillPortion(8)),
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Using a text_input for the package name makes this central area a focusable/interactive widget. In Iced, interactive children typically consume mouse events, so clicking the package name may no longer trigger the row’s outer .on_press(Message::PackagePressed) (regression in selecting/highlighting a row by clicking its name). Consider implementing copy-to-clipboard without replacing the label with an input (e.g., handle Ctrl+C / double-click at the row/list level and write the package name to the clipboard), or otherwise ensure clicks on the name still publish PackagePressed.

Copilot uses AI. Check for mistakes.
Comment thread src/gui/widgets/package_row.rs Outdated
Comment thread src/gui/views/list.rs
Comment on lines +10 to 17
use crate::gui::views::settings::Settings;
use crate::gui::widgets::modal::Modal;
use crate::gui::widgets::navigation_menu::ICONS;
use crate::gui::widgets::package_row::Message as PackageRowMessage;
use std::path::PathBuf;

use crate::gui::views::settings::Settings;
use crate::gui::widgets::modal::Modal;
use crate::gui::widgets::package_row::{Message as RowMessage, PackageRow};
use crate::gui::widgets::text;
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

PackageRowMessage is an alias of the same enum already imported as RowMessage from package_row. Importing both and matching on PackageRowMessage::Noop while using RowMessage::* for the other variants is redundant and makes the match harder to follow; it can be simplified by using a single alias (e.g., RowMessage::Noop) and removing the extra import.

Copilot uses AI. Check for mistakes.
Comment thread src/gui/widgets/package_row.rs Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AnonymousWP
Copy link
Copy Markdown
Member

@lawson85 Could you also follow-up with the other Copilot comments?

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

Labels

enhancement New feature or request rust Pull requests that update rust code UI Related to the UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(gui): allow copying package-names

4 participants