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

[dashboard] Add autofocus to some modal #6408

Merged
merged 1 commit into from
Oct 27, 2021
Merged

[dashboard] Add autofocus to some modal #6408

merged 1 commit into from
Oct 27, 2021

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Oct 26, 2021

Description

Add autofocus when renaming a workspace, deleting account, deleting team, add environment, add team

Related Issue(s)

Fixes #6371

How to test

  1. Create a team
  2. Go to team settings
  3. Click Delete Team
  4. You will see the input field auto focus

Release Notes

NONE

Documentation

@roboquat roboquat added release-note-none team: webapp Issue belongs to the WebApp team labels Oct 26, 2021
@roboquat roboquat requested a review from gtsiolis October 26, 2021 17:53
@iQQBot
Copy link
Contributor Author

iQQBot commented Oct 26, 2021

@gtsiolis Do I split PR ? or just keep this ?

@gtsiolis
Copy link
Contributor

gtsiolis commented Oct 26, 2021

Thanks @iQQBot! Could you split this as you suggested in #6408 (comment) if that's not too much to ask? 🙈

I'd love to keep these two fixes separate and loop in @laushinka for another pair of eyes in fixing #6383 since she was also involved in a closely related PR in #6058. 👀

/werft run

👍 started the job as gitpod-build-pd-auto-focus-fork.0

@iQQBot
Copy link
Contributor Author

iQQBot commented Oct 27, 2021

@gtsiolis already split , another PR is #6413, but it seem not related #6058, because #6058 only change some display text 😂

@gtsiolis
Copy link
Contributor

gtsiolis commented Oct 27, 2021

/werft run

👍 started the job as gitpod-build-pd-auto-focus-fork.1

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Flawless! Thanks @iQQBot! Changes look great. 🔮

@@ -37,7 +37,7 @@ export default function () {
<div className="border rounded-xl p-6 border-gray-100 dark:border-gray-800">
<h3 className="text-center text-xl mb-6">What's your team's name?</h3>
<h4>Team Name</h4>
<input className={`w-full${!!creationError ? ' error' : ''}`} type="text" onChange={event => name = event.target.value} />
<input autoFocus className={`w-full${!!creationError ? ' error' : ''}`} type="text" onChange={event => name = event.target.value} />
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: YES!

@@ -175,7 +175,7 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
{errorMessage}
</div>
: null}
<input className="w-full truncate" type="text" defaultValue={workspaceDescription} ref={renameInputRef} />
<input autoFocus className="w-full truncate" type="text" defaultValue={workspaceDescription} ref={renameInputRef} />
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: This feels good!

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 0923ed49fb4137479d3f6930ec7ec37183034f0c

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gtsiolis

Associated issue: #6371

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 21091c8 into gitpod-io:main Oct 27, 2021
@iQQBot iQQBot deleted the pd/auto-focus branch November 4, 2021 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus on the first modal input when renaming a workspace
3 participants