Replace hotkey scopes by focus stack (Part 4 - Inputs) (#12933)
# Replace hotkey scopes by focus stack (Part 4 - Inputs) This PR is the 4th part of a refactoring aiming to deprecate the hotkey scopes api in favor of the new focus stack api which is more robust. Part 1: https://github.com/twentyhq/twenty/pull/12673 Part 2: https://github.com/twentyhq/twenty/pull/12798 Part 3: https://github.com/twentyhq/twenty/pull/12910 In this part, I refactored all inputs in the app so that each input has a unique id which can be used to track the focused element.
This commit is contained in:
@ -210,6 +210,7 @@ export const SettingsRoleAssignment = ({
|
||||
/>
|
||||
<StyledSearchContainer>
|
||||
<StyledSearchInput
|
||||
instanceId="role-assignment-member-search"
|
||||
value={searchFilter}
|
||||
onChange={handleSearchChange}
|
||||
placeholder={t`Search an assigned team member...`}
|
||||
|
||||
@ -125,6 +125,7 @@ export const SettingsRolePermissionsObjectLevelObjectPicker = ({
|
||||
<Section>
|
||||
<StyledSearchContainer>
|
||||
<StyledSearchInput
|
||||
instanceId="role-permissions-object-search"
|
||||
value={searchFilter}
|
||||
onChange={handleSearchChange}
|
||||
placeholder={t`Search an object`}
|
||||
|
||||
@ -42,6 +42,9 @@ export const SettingsRoleSettings = ({
|
||||
|
||||
const { openModal } = useModal();
|
||||
|
||||
const descriptionTextAreaId = `${roleId}-description`;
|
||||
const nameTextInputId = `${roleId}-name`;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Section>
|
||||
@ -60,6 +63,7 @@ export const SettingsRoleSettings = ({
|
||||
/>
|
||||
</StyledInputContainer>
|
||||
<TextInput
|
||||
instanceId={nameTextInputId}
|
||||
value={settingsDraftRole.label}
|
||||
fullWidth
|
||||
onChange={(value: string) => {
|
||||
@ -73,6 +77,7 @@ export const SettingsRoleSettings = ({
|
||||
/>
|
||||
</StyledInputsContainer>
|
||||
<TextArea
|
||||
textAreaId={descriptionTextAreaId}
|
||||
minRows={4}
|
||||
placeholder={t`Write a description`}
|
||||
value={settingsDraftRole.description || ''}
|
||||
|
||||
@ -39,6 +39,7 @@ export const SettingsRoleLabelContainer = ({
|
||||
return (
|
||||
<StyledHeaderTitle>
|
||||
<TitleInput
|
||||
instanceId="role-label-input"
|
||||
disabled={!settingsDraftRole.isEditable}
|
||||
sizeVariant="md"
|
||||
value={settingsDraftRole.label}
|
||||
|
||||
Reference in New Issue
Block a user