Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an UI feature to reset WorkspaceImage style #471

Open
GlennPlou opened this issue Sep 27, 2024 · 0 comments · May be fixed by #472
Open

Provide an UI feature to reset WorkspaceImage style #471

GlennPlou opened this issue Sep 27, 2024 · 0 comments · May be fixed by #472
Milestone

Comments

@GlennPlou
Copy link
Contributor

GlennPlou commented Sep 27, 2024

Issue description

It is currently difficult and not ergonomic to delete the image associated with a node in a diagram. Today, there are 2 ways of doing this:

  • Click on the “Reset style properties to default values” button, which resets all other modified features (label, color...)
    image

  • Use the “Style” tab of the Properties view, and manually delete the contents of Workspace Path, then delete “workspacePath” from the Custom Feature list, and finally refresh the diagram. This method isn't ergonomic and isn't accessible to all users.
    image

A more ergonomic way of deleting an image associated with a node should be provided.
Since there's already a dialog for managing the image associated with a node, it would be more efficient to add functionality to the dialog rather than adding yet another context menu or toolbar button.

I propose the following change to solve the described issue: A new “Reset Image Style” button in the dialog.
image

Steps to validate:

  1. Import project issue_471 in your workspace from issue_471.zip, open issue_471 package entities diagram, select NewEclass1, open Properties view and the Error Log view.
    image
  2. Click on Set style to workspace image button from tabbar or Appearance tab in Properties view
    Expected: The dialog appears. The image path field refers to the actual image issue_471/images/green_beetle.png. The "Reset Image Style" button is enabled. "OK" button is disabled.
    image
  3. Click on "Reset Image Style" button.
    Expected: The "Reset Image Style" button is disabled. OK button is enabled. the path is empty.
  4. Select another image in the gallery, such as "blue_beetle.png" in issue_471 > images.
    Expected: The path refers to issue_471/images/blue_beetle.png. The "Reset Image Style" button is enabled. "OK" button is disabled.
  5. Click on an invalid location, such as an empty place in the gallery, or the project "issue_471" in the tree viewer.
    Expected: The path is updated with the actual Workspace Image issue_471/images/green_beetle.png. The "Reset Image Style" button is enabled. "OK" button is disabled.
  6. Click on "Reset Image Style" button again, then click "OK".
    Expected: The style of the node has been updated: the image is not even used, and other custom features are preserved (bold, italic, color label, size label...)
    image
GlennPlou added a commit that referenced this issue Sep 30, 2024
A new button "Reset Image Style" has been added to reset the
WorkspaceImage assigned to a DDiagramElement while preserving all other
style modifications.

Bug: #471
Signed-off-by: Glenn Plouhinec <glenn.plouhinec@obeo.fr>
@pcdavid pcdavid added this to the v7.4.5 milestone Oct 1, 2024
@pcdavid pcdavid modified the milestones: v7.4.5, v7.4.6 Nov 14, 2024
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 a pull request may close this issue.

2 participants