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

Add possibility to show an outline in preview if no tag is present #2744

Closed

Conversation

kulturbande
Copy link
Contributor

What is this pull request for?

Extend the element_view_for - method to show an outline to element, that has a disabled tag - option. It adds an unregistered custom component tag (which will have no visual representation except one display property), to make the element clickable and highlightable.

Screenshots

CleanShot 2024-02-25 at 15 25 30@2x
CleanShot 2024-02-25 at 15 24 54@2x

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

@kulturbande kulturbande force-pushed the preview-outline-without-tag branch from afbb848 to 42a095f Compare February 25, 2024 14:28
Extend the element_view_for - method to show an outline to element, that has a disabled tag - option. It adds an unregistered custom component tag (which will have no visual representation except one display property), to make the element clickable and highlightable.
@kulturbande kulturbande force-pushed the preview-outline-without-tag branch from 42a095f to ad0bb5a Compare February 25, 2024 15:23
@kulturbande
Copy link
Contributor Author

kulturbande commented Feb 25, 2024

The biggest downside is, that it can break CSS selectors. For example:

.foo > details {}
<div class="foo">
  <alchemy-preview>
    <details>...</details>
  </alchemy-preview>
</div>

There is a possibility to set the alchemy-preview - tag to display: contents;, which would solve the selector - issue, but the outline wouldn't be visible anymore.

@tvdeyen
Copy link
Member

tvdeyen commented Feb 26, 2024

Unfortunately we cannot do this because of the downside mentioned. Thanks, but closing for now

@tvdeyen tvdeyen closed this Feb 26, 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 this pull request may close these issues.

2 participants