Skip to content

feat: Added button to copy publish.yml #1071

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

EGAMAGZ
Copy link
Contributor

@EGAMAGZ EGAMAGZ commented Apr 24, 2025

Preview:

imagen

@EGAMAGZ
Copy link
Contributor Author

EGAMAGZ commented Apr 24, 2025

@crowlKats I think this a bug with deno. When I try to add the ling ignore in the dangerouslySetInnerHTML attribute, the formatting duplicates it after the code tag. Something like this:

Before:

      <pre class="bg-slate-900 text-white rounded-lg rounded-tl-none p-4 mb-2 w-full max-w-full overflow-auto relative">
        <CopyButton
          text={WORKFLOW_CODE.replace(/<[^>]+>/g, '')}
          title="Copy workflow code"
          class="absolute top-2 right-2 z-1"
        />
        <code
           // deno-lint-ignore react-no-danger
          dangerouslySetInnerHTML={{__html: WORKFLOW_CODE}}>
        </code>
      </pre>

After:

      <pre class="bg-slate-900 text-white rounded-lg rounded-tl-none p-4 mb-2 w-full max-w-full overflow-auto relative">
        <CopyButton
          text={WORKFLOW_CODE.replace(/<[^>]+>/g, '')}
          title="Copy workflow code"
          class="absolute top-2 right-2 z-1"
        />
        <code
           // deno-lint-ignore react-no-danger
          dangerouslySetInnerHTML={{__html: WORKFLOW_CODE}}>
        </code>

           // deno-lint-ignore react-no-danger
      </pre>

Also, it is possible to check this behaviour in the previous actions executed

@AugustinMauroy
Copy link
Contributor

IMO, the icon/button should be inside of the gray box

@EGAMAGZ
Copy link
Contributor Author

EGAMAGZ commented Apr 25, 2025

Added a bg to the button.

Dark mode:
image

Light mode:
image

Copy link
Contributor

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM !

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