Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SearchField/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SearchFieldSubmitButton from './SearchFieldSubmitButton';
export const SEARCH_FIELD_SCREEN_READER_TEXT_LABEL = 'search';
export const SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON = 'submit search';
export const SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON = 'clear search';
export const SEARCH_FIELD_BUTTON_TEXT = 'search';
export const SEARCH_FIELD_BUTTON_TEXT = 'Search';
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.

We should probably just remove this completely. We already have a default for buttonText in SearchField.SubmitButton

SearchFieldSubmitButton.defaultProps = {
variant: 'light',
submitButtonLocation: 'internal',
buttonText: 'Search',
};

So it'd be nice to not have this defined in 2 places.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The SEARCH_FIELD_BUTTON_TEXT variable has been removed

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.

I think it would be good to have translations for the "Search" string.
Currently, we have an ongoing forum discussion about incorrect translations, which also concerns the SearchField component button text.

@filippovskii09 could you please wrap this text into translations?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@PKulkoRaccoonGang translation was added!


const STYLE_VARIANTS = [
'light',
Expand Down
8 changes: 8 additions & 0 deletions src/SearchField/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@
.pgn__searchfield__button.btn[type="submit"] {
border-radius: 0;
margin-inline-start: var(--pgn-spacing-search-field-margin-button);

&:focus::before {
border-radius: inherit;
}

&:focus-visible::after {
content: none;
}
}

.pgn__searchfield__iconbutton-submit,
Expand Down