Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Copy text#31

Merged
nicosampler merged 4 commits intodevelopmentfrom
copyText
Jul 29, 2020
Merged

Copy text#31
nicosampler merged 4 commits intodevelopmentfrom
copyText

Conversation

@nicosampler
Copy link
Contributor

@nicosampler nicosampler commented Jul 7, 2020

Closes #38.

@nicosampler nicosampler added the WIP Work in progress label Jul 7, 2020
@nicosampler nicosampler self-assigned this Jul 7, 2020
@nicosampler nicosampler removed the WIP Work in progress label Jul 17, 2020
@nicosampler nicosampler marked this pull request as draft July 17, 2020 17:08
@ghost
Copy link

ghost commented Jul 20, 2020

Travis automatic deployment:
https://pr31--safereactcomponents.review.gnosisdev.com

@ghost
Copy link

ghost commented Jul 20, 2020

Travis automatic deployment:
https://pr31--safereactcomponents.review.gnosisdev.com

@nicosampler nicosampler changed the base branch from development to issue-36 July 20, 2020 16:46
@nicosampler nicosampler requested review from dasanra and mmv08 July 20, 2020 19:37
@nicosampler nicosampler marked this pull request as ready for review July 20, 2020 19:38
@nicosampler nicosampler requested a review from alongoni July 20, 2020 19:38
Base automatically changed from issue-36 to development July 23, 2020 13:12
@github-actions
Copy link

github-actions bot commented Jul 23, 2020

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@ghost
Copy link

ghost commented Jul 23, 2020

Travis automatic deployment:
https://pr31--safereactcomponents.review.gnosisdev.com

@ghost
Copy link

ghost commented Jul 23, 2020

Travis automatic deployment:
https://pr31--safereactcomponents.review.gnosisdev.com

@nicosampler
Copy link
Contributor Author

@mikheevm ready for review

className?: string;
};

const CopyToClipboard = ({
Copy link
Contributor

Choose a reason for hiding this comment

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

CopyBtn? feels weird to have copyToClipboard and CopyToClipboard in the same file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think CopyToClipboard is much explicit than just CopyBtn. I renamed the function instead.

Copy link
Contributor

@mmv08 mmv08 Jul 27, 2020

Choose a reason for hiding this comment

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

Explicit about what? What is CopyToClipboard component? A button? A text which would be copied if you click on it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mikheevm renamed.

@@ -0,0 +1,51 @@
import React, { useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this placed in utils? Shouldn't it be in inputs like all other buttons are?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see it more like and utility than input, but I don't have strong opinions about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although all the components inside the input category should be used inside a form. This is not the case.

Copy link
Contributor

Choose a reason for hiding this comment

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

So we shouldn’t use the button from inputs for triggering scripts? Can we point this in a documentation?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the structure of the components should be refactored, could use evergreen as an example: https://evergreen.segment.com/components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we shouldn’t use the button from inputs for triggering scripts? Can we point this in a documentation?

I think we should, what I want to say is that input category is more related (not exclusive) to inputs form. As I user of the lib, if I want to search for a copy button, I would search first in utilities before inputs. But again, just my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the structure of the components should be refactored, could use evergreen as an example: https://evergreen.segment.com/components

We discussed this before and we decided to follow the material-ui structure. but sure, we can change that, please create an issue and we can reorganize the categories.

@ghost
Copy link

ghost commented Jul 24, 2020

Travis automatic deployment:
https://pr31--safereactcomponents.review.gnosisdev.com

@nicosampler nicosampler requested a review from mmv08 July 24, 2020 16:27
@ghost
Copy link

ghost commented Jul 28, 2020

Travis automatic deployment:
https://pr31--safereactcomponents.review.gnosisdev.com

Copy link
Contributor

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

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

nitpick: file's name is copyTextToClipboard but the function that lives there is named copyToClipboard. Would be great if you align these names

src/utils/CopyToClipboardBtn/copyTextToClipboard.ts

@nicosampler nicosampler merged commit 2b43caf into development Jul 29, 2020
@mmv08 mmv08 deleted the copyText branch July 29, 2020 13:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy component

2 participants