Skip to content

Commit

Permalink
[MM-47776] Reverse order of input fields in server welcome screen (#2309
Browse files Browse the repository at this point in the history
)

* Reverse order of inputs in Server modals (add/edit)

* Revert "Reverse order of inputs in Server modals (add/edit)"

This reverts commit f3d577d.

* Update order of server fields in welcome screens

* Update server modal focus test

* Add margin between inputs
  • Loading branch information
tboulis authored Oct 24, 2022
1 parent 83b6c64 commit 0f51a62
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion e2e/specs/server_management/add_server_modal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('Add Server Modal', function desc() {
let newServerView;

it('MM-T1312 should focus the first text input', async () => {
const isFocused = await newServerView.$eval('#teamNameInput', (el) => el === document.activeElement);
const isFocused = await newServerView.$eval('#teamNameInput', (el) => el.isSameNode(document.activeElement));
isFocused.should.be.true;
});

Expand Down
28 changes: 14 additions & 14 deletions src/renderer/components/ConfigureServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,39 +301,39 @@ function ConfigureServer({
</p>
<div className='ConfigureServer__card-form'>
<Input
name='name'
name='url'
className='ConfigureServer__card-form-input'
type='text'
inputSize={SIZE.LARGE}
value={name}
onChange={handleNameOnChange}
customMessage={nameError ? ({
value={url}
onChange={handleURLOnChange}
customMessage={urlError ? ({
type: STATUS.ERROR,
value: nameError,
value: urlError,
}) : ({
type: STATUS.INFO,
value: formatMessage({id: 'renderer.components.configureServer.name.info', defaultMessage: 'The name that will be displayed in your server list'}),
value: formatMessage({id: 'renderer.components.configureServer.url.info', defaultMessage: 'The URL of your Mattermost server'}),
})}
placeholder={formatMessage({id: 'renderer.components.configureServer.name.placeholder', defaultMessage: 'Server display name'})}
placeholder={formatMessage({id: 'renderer.components.configureServer.url.placeholder', defaultMessage: 'Server URL'})}
disabled={waiting}
darkMode={darkMode}
/>
<Input
name='url'
name='name'
className='ConfigureServer__card-form-input'
containerClassName='ConfigureServer__card-form-input-container'
type='text'
inputSize={SIZE.LARGE}
value={url}
onChange={handleURLOnChange}
customMessage={urlError ? ({
value={name}
onChange={handleNameOnChange}
customMessage={nameError ? ({
type: STATUS.ERROR,
value: urlError,
value: nameError,
}) : ({
type: STATUS.INFO,
value: formatMessage({id: 'renderer.components.configureServer.url.info', defaultMessage: 'The URL of your Mattermost server'}),
value: formatMessage({id: 'renderer.components.configureServer.name.info', defaultMessage: 'The name that will be displayed in your server list'}),
})}
placeholder={formatMessage({id: 'renderer.components.configureServer.url.placeholder', defaultMessage: 'Server URL'})}
placeholder={formatMessage({id: 'renderer.components.configureServer.name.placeholder', defaultMessage: 'Server display name'})}
disabled={waiting}
darkMode={darkMode}
/>
Expand Down

0 comments on commit 0f51a62

Please sign in to comment.