-
Notifications
You must be signed in to change notification settings - Fork 22
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
[feat]: <rh-code-block> #328
Comments
We would only remove pfe-modal patternfly/patternfly-elements#2036 |
Requirements
Current design to work fromhttps://xd.adobe.com/view/a64d7305-b6cb-439c-8caa-1039834fa1b8-f31e/ Relevant chats
|
Cloud.redhat.com's use of codeblock is not reliant on our implementation. AKA we are not a blocker. |
@methomps Possible to provide any screenshots from that environment? I'm having trouble logging into my account. |
Oh boy, I'll need @dcaryll and/or @eohammond to assist with this. I don't know much about this issue at all. Dustin may be able to assist too. |
@coreyvickery The request was to use the codeblock pattern on cloud.redhat.com. I believe Dustin had a use case for codeblock on learning paths, like this page for instance Do you need screenshots from console.redhat.com? |
@eohammond If you're able to provide, yes. |
@methomps This is being reviewed by leads from other teams. https://xd.adobe.com/view/a64d7305-b6cb-439c-8caa-1039834fa1b8-f31e/ |
@methomps We are still blocked on this until we sync with the other design system leads to see what research and/or design they have already done, will try to move this forward early next week. |
Probably a good candidate to test our new design process once we've defined that process a bit more with the leads collaborative. |
1:1: patternfly/patternfly-elements#2093 Also relevant: RedHat-UX/red-hat-design-tokens#16 |
Ideally we wouldn't have to create this at all, and rather use a prism or highlight.js syntax theme. Talking it over with @mwcz, we agreed that doing code highlighting client-side is not ideal. This could be useful for certain cases like cms or places where it's cumbersome to server-render code, but shouldn't be the first choice. On the implementation side, if we do implement this (and pfe-codeblock), I'd prefer to either fork or white-label the existing cc @markcaron @heyMP |
Current https://xd.adobe.com/view/a64d7305-b6cb-439c-8caa-1039834fa1b8-f31e/ |
Syntax highlighting: https://xd.adobe.com/view/c4cc943e-618d-4fbe-8ab2-8e29fd135393-919f/ |
priorities:
patterns
|
For line highlighting, see |
@coreyvickery grey background and border colours |
@bennypowers I forgot the token names because I’m mobile, but F5 -> F2 and D2 -> C7. Those hex values should map to tokens. |
Thanks I'll check tomorrow and get back to you if I have more questions 🙏 |
can you elaborate on the resize behaviour? |
@bennypowers I apologize for the XD not being 100% clear.
Ping me right away if you need me to mock up anything more. |
yes resize can be in either both or none directions: https://developer.mozilla.org/en-US/docs/Web/CSS/resize I'd like to see a rough ux demo of the intention here. it's not clear to me yet how much of this we can accomplish easily with css |
perhaps we can workshop this for a bit at office hours |
@bennypowers I will not be able to make it, but please do so and let me know if we need to change the design or rethink this feature altogether. |
could you export svgs for the action icons please? |
I did a little work on copy buttons for code block (only) this morning, based on the xd here, but i'm going to revert that work pending discussion in #423 tl;dr: we can't use tooltip or button text for copy state, should use alert, plus perhaps role=status cc @nikkimk for comments and corrections, with thanks. |
ButtonsThe button styles in the XD are mostly bespoke (particularly the "action" buttons - the ones superimposed in the top right of the code block). do these represent new button variants, or should I continue to just hack them into bespoke variants private to code block? Panel/Card/ToolbarThe upper toolbar, is this a component? Are there or will there be other components that fit into this "toolbar with content" deal? |
Calloutscan they go in a 'gutter' on the left (inline start) instead of at the end? this would be easier to implement and read (imo) for word-wrapped snippets |
Today at Office hours we took the decision to release a very basic version of code-block with bellsprout. features we'll push off to bulbasaur:
We also have some usability questions we'd like to address:
SO, basically the bellsprout version will be a gray box that formats a script of text |
<rh-code-block>
Mockups
Options/Feature priorities
Taken from Benny's comment below
Patterns
To be implemented later
The text was updated successfully, but these errors were encountered: