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 buttons to download and copy to clipboard content to TextEditor #37333

Merged
merged 17 commits into from
Feb 1, 2024

Conversation

mcbattirola
Copy link
Contributor

@mcbattirola mcbattirola commented Jan 26, 2024

This PR adds two buttons to the TextEditor component, controlled by props and hidden by default.

These buttons will be used in a future Machine ID creation flow PR, as you can see in the design here https://www.figma.com/file/v6GunK50D2VC7w7I2FBDNf/Management?type=design&node-id=3042-40929&mode=design&t=V5393yPBhgLmN5uR-4

I've also added tests and storybook entries for this component.

Screenshot from 2024-01-26 13-02-24

Supports #34300

@mcbattirola mcbattirola changed the title Add buttons to download and copy to clipboard to TextEditor Add buttons to download and copy to clipboard content to TextEditor Jan 26, 2024
Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@mcbattirola mcbattirola added the no-changelog Indicates that a PR does not require a changelog entry label Jan 26, 2024
@mcbattirola mcbattirola requested review from gzdunek and removed request for klizhentas January 26, 2024 14:00
@zmb3
Copy link
Collaborator

zmb3 commented Jan 26, 2024

Didn't @flyinghermit just do something similar or am I confused?

@flyinghermit
Copy link
Contributor

Didn't @flyinghermit just do something similar or am I confused?

@zmb3 It's similar but looks like this is being added to the TextEditor and mine updates the TextSelectCopyMulti component #37232

P.S. good to know I am not the only one who thought we should have the download button in our text editor and command box :D

@mcbattirola mcbattirola force-pushed the mcbattirola/download-and-copy-buttons-code-editor branch from aa22bce to c68d992 Compare January 26, 2024 16:13
…tirola/download-and-copy-buttons-code-editor
@mcbattirola mcbattirola added this pull request to the merge queue Feb 1, 2024
Merged via the queue into master with commit 8e941fe Feb 1, 2024
35 checks passed
@mcbattirola mcbattirola deleted the mcbattirola/download-and-copy-buttons-code-editor branch February 1, 2024 20:25
mcbattirola added a commit that referenced this pull request Feb 13, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
mcbattirola added a commit that referenced this pull request Feb 13, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 13, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 13, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 13, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 15, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 15, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 16, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
michellescripts pushed a commit that referenced this pull request Feb 16, 2024
…#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license
github-merge-queue bot pushed a commit that referenced this pull request Feb 16, 2024
* Add endpoint to get bots by name (#37412)

* Add endpoint to get bots by name

* Lint

* Fix test method's name

Co-authored-by: Noah Stride <noah.stride@goteleport.com>

---------

Co-authored-by: Noah Stride <noah.stride@goteleport.com>

* Backend supporting changes for Bot creation flow (#37348)

* Add bot ui labels and github join token

* Use strings.HasPrefix instead of includes

* Add `ssh` to label

* Add bot join token endpoint

* Lint

* Fix comment typo

Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>

* Fix comment typo

Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>

* Improve webUIFlowLabelKey comment

---------

Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>

* add bots UI, disabled (#36845)

- in original data table view

* Add Bot + GitHub Actions SSH UI Flow (#37443)

* add bots UI, disabled

- in original data table view

* Add bot creation UI

* Remove duplicated types

* add bots UI, disabled

- in original data table view

* Fix types and tests

* Use bot join token api endpoint

* Fix tests

* Linting and small fixes

* Fix tests

* Add missing licenses

* Improve styles, error messages, etc

* Remove clusterId from bot routes

* Undo enabling feature

* Remove unused join role bot

* Rename var

* Reuse makeListBot

* Add missing type

* Revert MachineIDIntegrationSection for now

* Lint

* Apply suggestions from code review - fix typos

Co-authored-by: Noah Stride <noah.stride@goteleport.com>

* Remove kubernetes section fromm example yaml

* Remove border color from reftype selector

* Small changes to address code review

* Use setAttempt

* add try/catch block when parsing repo addresses

* Improve tests;remove unecessary fragment

* Use gap in flex. Fix typo

* Lint fix

* Drop "ex" from input placeholders

* Add stories for no perm and bot picker

* Add copy to explain wrkflow name limits

* fix setCurentStep

* Fix invalid host error rendering

* Use PascalCase for error components

* Improve field name validation

* Remove unecessary comments

* Update copy and minor style change

---------

Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com>
Co-authored-by: Noah Stride <noah.stride@goteleport.com>

* add bot edit-role flow (#37828)

* add bot edit-role flow

* only send masked/updated fields

* Add GitHub Actions bot view (#37852)

* add bots UI, disabled

- in original data table view

* Add bot creation UI

* Remove duplicated types

* add bots UI, disabled

- in original data table view

* Fix types and tests

* Use bot join token api endpoint

* Fix tests

* Linting and small fixes

* Fix tests

* Add missing licenses

* Improve styles, error messages, etc

* Remove clusterId from bot routes

* Undo enabling feature

* Remove unused join role bot

* Rename var

* Reuse makeListBot

* Add missing type

* Revert MachineIDIntegrationSection for now

* Lint

* Apply suggestions from code review - fix typos

Co-authored-by: Noah Stride <noah.stride@goteleport.com>

* Remove kubernetes section fromm example yaml

* Remove border color from reftype selector

* Small changes to address code review

* Use setAttempt

* add try/catch block when parsing repo addresses

* Improve tests;remove unecessary fragment

* Use gap in flex. Fix typo

* Lint fix

* Drop "ex" from input placeholders

* Add stories for no perm and bot picker

* Add copy to explain wrkflow name limits

* fix setCurentStep

* Fix invalid host error rendering

* Use PascalCase for error components

* Improve field name validation

* Remove unecessary comments

* Add bot type by label

* Add bot view...

* Show view gh actions yaml only for gh bots

* Use existing pattern for operations

* Add story and missing license

* Fix typos

Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>

---------

Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com>
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>

* Add buttons to download and copy to clipboard content to `TextEditor` (#37333)

* Add editor buttons

* Set icon size

* Move downloadObject to OSS

* remove unused test-id

* Use values from theme

* Fix buttons positioning

* Convert jsx files to tsx

* Use const instead of var

* Add z-index to buttons

* Add license

* Improvements to Bot resource (additional validation and label propagation) (#38013)

* PRevent creating bots with an empty string role

* Propagate labels to Bot user and vice versa

* Extract slice declaration for nonPropagatedLabels

* Fixed web tests relying on empty string roles

* Use "set" instead of slice for nonPropagatedLabels

* Make testing of empty string handling more thorough

* add role assertions to create

* Appease linter as to want/got order

---------

Co-authored-by: Michelle Bergquist <michelle.bergquist@goteleport.com>

* Add bot permissions and turn on feature (#37943)

* Fix makeBot labels (#38176)

---------

Co-authored-by: matheus <matheus.battirola@goteleport.com>
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/md ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants