Skip to content

fix(CodeEditor): only include pf-v6-c-code-editor__upload when hovering is active over an empty state #11568

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

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

nicolethoen
Copy link
Contributor

What: Closes #11518

@patternfly-build
Copy link
Contributor

patternfly-build commented Feb 25, 2025

@nicolethoen nicolethoen changed the title fix(CodeEditor): only include pf-v6-c-code-editor__upload when ng is active over an empty state fix(CodeEditor): only include pf-v6-c-code-editor__upload when hovering is active over an empty state Feb 26, 2025
Copy link
Member

@logonoff logonoff left a comment

Choose a reason for hiding this comment

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

Do we still want an dashed outline around the margins of the editor when a file is dragged on an in-use editor?

Somewhat like this:
image

@thatblindgeye
Copy link
Contributor

@mcoker @andrew-ronaldson @nicolethoen re: the above comment.

I feel like that would make sense to retain the dashed border when you're dragging to upload something over a code editor that is already in use. We don't prevent that functionality so right now it would be a valid action, dragging a file to replace whatever content is already in the code editor.

Rather than removing the __upload element+the hidden input element in React, which seems vital for that styling, would we instead want to tweak the CSS in core to remove padding if __upload contains the pf-v6-c-code-editor__code element?

@nicolethoen
Copy link
Contributor Author

ohp - I saw your comment after I pushed the fix to remove hover styles after initial upload.
FWIW, I think this works now a little more intuitively... WDYT, @thatblindgeye ?

@thatblindgeye thatblindgeye merged commit a53c929 into patternfly:main Mar 11, 2025
13 checks passed
@patternfly-build
Copy link
Contributor

Your changes have been released in:

Thanks for your contribution! 🎉

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.

Bug - CodeEditor - upload class only needed while dropzone is visible
5 participants