Skip to content

Auto select install command on modal open#38

Merged
timothyis merged 1 commit into
vercel:masterfrom
rista404:auto-select-install-code
Apr 24, 2018
Merged

Auto select install command on modal open#38
timothyis merged 1 commit into
vercel:masterfrom
rista404:auto-select-install-code

Conversation

@rista404

Copy link
Copy Markdown
Contributor

Just a tiny UX improvement 🍬
You can ⌘ + c immediately after clicking "Install".

I placed selectText in the lib directory, let me know if that's okay.

<pre
ref={pre => {
this.installCode = pre
}}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It will recreate a function at each render.
Maybe better to move this to an onInstallCodeRef() method, binded to this in constructor.
This is obviously not a performance bottleneck 😀
But maybe cleaner.

@timothyis timothyis self-requested a review April 24, 2018 21:26

@timothyis timothyis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@timothyis timothyis merged commit de87241 into vercel:master Apr 24, 2018
mischah added a commit to mischah/hyper-site that referenced this pull request Apr 25, 2018
* master:
  Add hyper-savetext to Hyper store (vercel#29)
  Update readme
  Fix bug when trying to access props instead of state
  Add hyper-oceanic-next theme (vercel#44)
  Auto select install code iwhen InstallModal opens (vercel#38)
  1.2.0
  Fix install modal
  Only try to load plugin data from npms where needed
  Fix content not displaying if npms.io is down

# Conflicts:
#	plugins.json
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.

3 participants