Skip to content

Conversation

@renner0e
Copy link
Collaborator

still need to test

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a configuration file for the Plasma Task Manager widget. The review identifies several areas for improvement to enhance usability and robustness. Specifically, some Enum type configurations should use named choices for clarity, another configuration entry lacks documentation for its possible values, and the default list of launchers contains hardcoded application-specific entries which may not be universally available, potentially leading to a poor default user experience.

Comment on lines +29 to +32
<entry name="groupingStrategy" type="Enum">
<label>How tasks are grouped: 0 = Do Not Group, 1 = By Program Name</label>
<default>1</default>
</entry>

Choose a reason for hiding this comment

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

high

The groupingStrategy entry is defined as an Enum, but it doesn't use <choices> to define the possible values. Instead, the values are documented as magic numbers in the label. This prevents configuration tools from creating a user-friendly selection list and forces users to remember the mapping between numbers and their meanings. To improve usability and maintainability, this should be defined with named choices.

Suggested change
<entry name="groupingStrategy" type="Enum">
<label>How tasks are grouped: 0 = Do Not Group, 1 = By Program Name</label>
<default>1</default>
</entry>
<entry name="groupingStrategy" type="Enum">
<label>How tasks are grouped</label>
<choices>
<choice name="DoNotGroup"/>
<choice name="ByProgramName"/>
</choices>
<default>1</default>
</entry>

Comment on lines +33 to +36
<entry name="groupedTaskVisualization" type="Enum">
<label>What happens when clicking on a grouped task: 0 = cycle through grouped tasks, 1 = try to show tooltips, 2 = try to show present Windows effect, 3 = show textual list (AKA group dialog)</label>
<default>0</default>
</entry>

Choose a reason for hiding this comment

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

high

Similar to groupingStrategy, the groupedTaskVisualization entry is an Enum that uses magic numbers documented in the label instead of named <choices>. This is not user-friendly and is error-prone. Using named choices would make the configuration clearer and more robust, especially for any UI generated from this file.

    <entry name="groupedTaskVisualization" type="Enum">
      <label>What happens when clicking on a grouped task</label>
      <choices>
        <choice name="CycleTasks"/>
        <choice name="ShowTooltips"/>
        <choice name="PresentWindows"/>
        <choice name="ShowList"/>
      </choices>
      <default>0</default>
    </entry>

Comment on lines +53 to +56
<entry name="sortingStrategy" type="Int">
<label>Values from TaskManager::TasksModel::SortMode</label>
<default>1</default>
</entry>

Choose a reason for hiding this comment

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

high

The sortingStrategy is defined as an Int, and its label only refers to the C++ source code (TaskManager::TasksModel::SortMode) for possible values. This makes the configuration opaque and requires users to have access to and understand the source code to configure it. This is a significant usability and maintainability issue. This entry should ideally be an Enum with named choices, or at the very least, the label should document the meaning of the integer values.

Comment on lines +105 to +108
<entry name="launchers" type="StringList">
<label>The list of launcher tasks on the widget. Usually .desktop file or executable URLs. Special URLs such as preferred://browser that expand to default applications are supported.</label>
<default>preferred://browser,applications:org.gnome.Ptyxis.desktop,applications:io.github.kolunmi.Bazaar.desktop,preferred://filemanager</default>
</entry>

Choose a reason for hiding this comment

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

high

The default list of launchers includes hardcoded desktop file names for specific applications (org.gnome.Ptyxis.desktop, io.github.kolunmi.Bazaar.desktop). If these applications are not installed on a user's system, this will result in broken or missing icons in the task manager, leading to a poor default experience. The default configuration should be more generic and not rely on applications that may not be present.

    <entry name="launchers" type="StringList">
      <label>The list of launcher tasks on the widget. Usually .desktop file or executable URLs. Special URLs such as preferred://browser that expand to default applications are supported.</label>
      <default>preferred://browser,preferred://filemanager</default>
    </entry>

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