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

Fixes #38242 replace clipboard copy with pf5 #10457

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Lukshio
Copy link

@Lukshio Lukshio commented Feb 26, 2025

No description provided.

@github-actions github-actions bot added the UI label Feb 26, 2025
@Lukshio Lukshio changed the title 38242 replace clipboard copy with pf5 Fixes #38242 replace clipboard copy with pf5 Feb 26, 2025
@Lukshio Lukshio closed this Feb 26, 2025
@Lukshio Lukshio reopened this Feb 26, 2025
<% if @host.operatingsystem && @host.initial_configuration_template %>
<div style="max-width: 600px">
<%= _('For initial configuration of the host run this command:') %>
<%= react_component('ClipboardCopy', { text: "curl #{@host.registration_url} | bash",
textareaProps: { readOnly: true, rows: '1', className: 'host-init-conf-textarea'}})
<%= react_component('ClipboardCopy', { text: "curl #{@host.registration_url} | bash" , textareaProps: {className: 'host-init-conf-textarea'}})
Copy link
Member

Choose a reason for hiding this comment

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

Should pass readonly:true

@@ -20,3 +20,11 @@
}
}
}

.pf-c-clipboard-copy.pf-m-inline{
Copy link
Member

Choose a reason for hiding this comment

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

Please add a classname to the PF component and use it for the css to prevent this css effecting other clipboardCopies

Copy link
Member

Choose a reason for hiding this comment

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

Or, remove the css and change the variant from inline to a normal type, that also looks fine to me. otherwise, we use pf variables for numbers and colors: https://v5-archive.patternfly.org/developer-resources/global-css-variables

variant={PFClipboardCopyVariant.expansion}
isExpanded
isReadOnly={textareaProps.readOnly ?? false}
className={textareaProps.className ?? ''}
Copy link
Member

Choose a reason for hiding this comment

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

Please use null instead of ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants