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

Disable fork button while forking #1667

Merged
merged 5 commits into from
Mar 29, 2019

Conversation

ValentinH
Copy link
Contributor

Fixes #844.

This is a first improvement:
fork-btn

After this, I'd like to work on a better feedback, maybe a circular loader inside the button. What do you think?

Checklist:

  • Documentation N/A
  • Tests N/A
  • Ready to be merged
  • Added myself to contributors table N/A

Fixes codesandbox#844.

This is a first fix. I'd like to work on a better feedback, maybe a circular loader inside the button. What do you think?
@lbogdan
Copy link
Contributor

lbogdan commented Mar 28, 2019

I think it would also be nice to have a positive feedback, like maybe changing the text to "Forking...".

@ValentinH
Copy link
Contributor Author

Totally agreed, I've just updated the PR.

@SaraVieira
Copy link
Contributor

Hey!!

I was also just working on this! Bless you!!

There is also a couple more places we have that button, it would be awesome to have that there too 😁

@ValentinH
Copy link
Contributor Author

@SaraVieira I've just checked and found this place where there is also a fork button:
image

Do you see any other places?

@SaraVieira
Copy link
Contributor

Awesome!!

I'm at home and my laptop is in the car but the code looks great and I will check the UI Tomorrow morning and most likely merge it 😁

Can you add to the contributors table ?

@ValentinH
Copy link
Contributor Author

I'm already in the contributors table 🙂

@ValentinH
Copy link
Contributor Author

What do you guys think about this animation?

animated-fork

@SaraVieira
Copy link
Contributor

I really like it! Nice css loading 🎉

Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

Man this is really clean! I left some really small nitpicks, but I love this implementation. Regarding the animation, I think it would be nicest to use something like the third from https://nzbin.github.io/three-dots/, we used three dots animations before for loading (not sure if we still have them). After those changes this is ready to merge!

small
>
<>
<Fork style={{ marginRight: '.5rem' }} />
Fork
{isForking ? 'Forking' : 'Fork'}
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be best to name it "Forking..." with the three dots to indicate an action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, i was hesitating between both because the dots makes the button really larger while forking. Now you convinced me :)

disabled={isForkingSandbox}
onClick={this.forkSandbox}
>
{isForkingSandbox ? 'Forking Sandbox' : 'Fork Sandbox'}
Copy link
Member

Choose a reason for hiding this comment

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

Same here, adding 3 dots ... would be nice.

@ValentinH
Copy link
Contributor Author

I'll keep the animation for a follow-up PR. I'll update following requested changes once I have access to my computer :)

@lbogdan
Copy link
Contributor

lbogdan commented Mar 29, 2019

Also, maybe make the button a bit wider, so that when you change the text to "Forking" it doesn't do that distracting wiggle.

@ValentinH
Copy link
Contributor Author

I think we need to decide between both solutions, because having "Forking..." will force to have the Fork button pretty large. This will look weird compare to siblings buttons.
What do you think?

@ValentinH
Copy link
Contributor Author

For the animation, being fancy depends on whether we want to change the button markup or not. In my screenshot, I only used one before pseudo element.

@CompuIves
Copy link
Member

Just played with it, works really well! Thanks for this contribution @ValentinH!

@CompuIves CompuIves merged commit e84179a into codesandbox:master Mar 29, 2019
@ValentinH ValentinH deleted the disable-fork-btn branch March 30, 2019 07:11
ValentinH pushed a commit to ValentinH/codesandbox-client that referenced this pull request Apr 5, 2019
This is a follow-up of codesandbox#1667.
The effect is simple because for now I didn't want to modify the markup of the button.

As far as my limited CSS skills lead me, @CompuIves suggestion regarding nzbin.github.io/three-dots would require to have a div wrapper around the button and a div to display the 3 dots. Do we want to do this?
ValentinH pushed a commit to ValentinH/codesandbox-client that referenced this pull request Apr 7, 2019
This is a follow-up of codesandbox#1667.
The effect is simple because for now I didn't want to modify the markup of the button.

As far as my limited CSS skills lead me, @CompuIves suggestion regarding nzbin.github.io/three-dots would require to have a div wrapper around the button and a div to display the 3 dots. Do we want to do this?
CompuIves pushed a commit that referenced this pull request Apr 16, 2019
* Show a loader on the button while forking

This is a follow-up of #1667.
The effect is simple because for now I didn't want to modify the markup of the button.

As far as my limited CSS skills lead me, @CompuIves suggestion regarding nzbin.github.io/three-dots would require to have a div wrapper around the button and a div to display the 3 dots. Do we want to do this?

* Introduce ProgressButton to have more possibilities for the loader

* Make the circles a bit smaller
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.

None yet

4 participants