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

Convert Stereotype property editors to ListView #2956

Merged
merged 17 commits into from
Dec 30, 2023
Merged

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Dec 24, 2023

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

Issue Number: #2231 , #2155

What is the new behavior?

Stereotype property page is using Gtk.ColumnView, the modern alternative to Gtk.TreeView.

The stereotype view is somewhat simplified (no expander buttons). I expect this will work, as long as there are not too many stereotypes applicable for an element. Values for unapplied stereotypes are insensitive.

image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • fix removal of "Show Stereotypes" option.
  • Reworked all ColumnView property editors to start editing on the activate signal (double-click or Enter).

@github-actions github-actions bot added the python Pull requests that update Python code label Dec 24, 2023
@amolenaar amolenaar marked this pull request as draft December 24, 2023 21:48
@amolenaar amolenaar marked this pull request as ready for review December 24, 2023 22:12
@amolenaar amolenaar marked this pull request as draft December 24, 2023 22:13
@amolenaar amolenaar marked this pull request as ready for review December 27, 2023 11:01
This is more in line with how other widgets react.
@amolenaar amolenaar linked an issue Dec 28, 2023 that may be closed by this pull request
3 tasks
Seems more appropriate than "Attributes".
@danyeaw danyeaw added chore Maintenance related PR and removed python Pull requests that update Python code labels Dec 30, 2023
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Another great improvement, thanks @amolenaar!

row[:] = row_data
return new_row
for st in sorted(
stereotypes, key=lambda s: normalize("NFC", s.name or "").casefold()
Copy link
Member

Choose a reason for hiding this comment

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

TIL about unicode normalize and casefold 👍

@danyeaw danyeaw merged commit a715b38 into main Dec 30, 2023
20 checks passed
@danyeaw danyeaw deleted the stereotype-listview branch December 30, 2023 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create the first attribute in a class using keyboard only
2 participants