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

Show CSS nodes below style sheet editor #3040

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Show CSS nodes below style sheet editor #3040

merged 2 commits into from
Jan 24, 2024

Conversation

amolenaar
Copy link
Member

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?

It's hard to guess what CSS nodes are part of an item in a diagram.

Issue Number: #3023

What is the new behavior?

Below the style editor, a node layout is given for the currently selected element.

image

@github-actions github-actions bot added the python Pull requests that update Python code label Jan 21, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

PR Type: Enhancement

PR Summary: The pull request introduces a feature that displays the CSS node layout for the currently selected element in the diagram below the style editor. This enhancement aims to make it easier for users to understand the CSS nodes associated with diagram items.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
  • Unsupported files: the diff contains files that Sourcery does not currently support during reviews.

General suggestions:

  • Ensure that the addition of the diagrams parameter to the PreferencesStack constructor is well-documented, as it signifies a more significant role for diagrams in the preferences functionality.
  • Verify that all methods using _current_item properly handle the case when it is None to prevent potential NoneType errors.
  • Consider adding an unsubscribe call for _selection_changed in the close method to avoid memory leaks or unintended behavior after the PreferencesStack is closed.
  • Review the overall impact of the changes on the application to ensure that the new behavior integrates smoothly with existing features.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

gaphor/ui/elementeditor.py Show resolved Hide resolved
gaphor/ui/elementeditor.py Show resolved Hide resolved
@mikekidner
Copy link
Contributor

This will be very helpful!

@amolenaar amolenaar linked an issue Jan 23, 2024 that may be closed by this pull request
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.

Nice, I think this needs a TWIG mention 😉

@danyeaw danyeaw added feature A new feature and removed python Pull requests that update Python code labels Jan 24, 2024
@danyeaw danyeaw merged commit 9d11cd9 into main Jan 24, 2024
19 checks passed
@danyeaw danyeaw deleted the show-css-nodes branch January 24, 2024 02:16
@amolenaar amolenaar mentioned this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fine grained CSS control
3 participants