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

Live editing for inline editors (popovers) #415

Merged
merged 3 commits into from Aug 25, 2020
Merged

Live editing for inline editors (popovers) #415

merged 3 commits into from Aug 25, 2020

Conversation

amolenaar
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation content changes

What is the current behavior?

I found it problematic that I had to explicitly "enter" a name in the popover editor. Even more so since the text in the sidebar editor for fields like "name" is instantly applied.

What is the new behavior?

Text edited in a popover editor is instantly applied. One can hit "ESC" to revert the text to before the change.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • Edit sessions should take place in one (1) transaction

@danyeaw
Copy link
Member

danyeaw commented Aug 25, 2020

@amolenaar Nice idea, I found this annoying as well 👍

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 25, 2020

Sourcery Code Quality Report (beta)

✅  Merging this PR will increase code quality in the affected files by 0.18 out of 10.

Quality metrics Before After Change
Complexity 2.25 1.92 -0.33 🔵
Method Length 50.87 43.89 -6.98 🔵
Quality 8.63 8.81 0.18 🔵
Other metrics Before After Change
Lines 263 286 23
Changed files Quality Before Quality After Quality Change
gaphor/UML/actions/actionseditors.py 9.20 9.34 0.14 🔵
gaphor/UML/classes/classeseditors.py 8.55 8.96 0.41 🔵
gaphor/diagram/inlineeditors.py 8.45 8.45 0.00
gaphor/diagram/general/generaleditors.py 8.64 8.94 0.30 🔵

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Overall Recommendation
gaphor/UML/classes/classeseditors.py association_item_inline_editor 9 191.81 5.39 Split out functionality
gaphor/diagram/general/generaleditors.py CommentItemInlineEditor 2 138.90 6.80 Split out functionality

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@amolenaar amolenaar merged commit f591b2c into master Aug 25, 2020
@amolenaar amolenaar deleted the live-editing branch August 25, 2020 19:02
@danyeaw danyeaw added the bug An issue in the application label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue in the application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants