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

[stable4] fix(FilePicker): Ensure focus-visible outline is visible for all focusable elements #936

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions lib/components/FilePicker/FileList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ function onChangeDirectory(dir: Node) {
<style scoped lang="scss">
.file-picker {
&__files {
// ensure focus outlines are visible
padding: 2px;
padding-inline-start: 12px; // align with bread crumbs
min-height: calc(5 * var(--row-height, 50px)); // make file list not jumping when loading (1x header 4x loading placeholders)
overflow: scroll auto;
Expand All @@ -185,6 +187,8 @@ function onChangeDirectory(dir: Node) {
position: sticky;
top: 0;
background-color: var(--color-main-background);
// ensure focus outline of buttons is visible
padding: 2px;

&.row-checkbox {
width: 44px;
Expand Down
5 changes: 5 additions & 0 deletions lib/components/FilePicker/FilePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,17 @@ export default {
}

&__main {
box-sizing: border-box;
width: 100%;
display: flex;
flex-direction: column;
// Auto fit height
min-height: 0;
flex: 1;

* {
box-sizing: border-box;
}
}
}

Expand Down
16 changes: 13 additions & 3 deletions lib/components/FilePicker/FilePickerNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ const updateFilterValue = (value: string) => emit('update:filterString', value)
align-items: start;
gap: 0.5rem;
min-width: 200px;
// ensure focus outline is visible
padding-block: 2px;

:deep(.button-vue__wrapper) {
justify-content: start;
Expand Down Expand Up @@ -137,9 +139,17 @@ const updateFilterValue = (value: string) => emit('update:filterString', value)
}
</style>

<style>
.file-picker__navigation .v-select.select {
min-width: 220px;
<style lang="scss">
/* Ensure focus outline is visible */
.file-picker__navigation {
padding-inline: 2px;
&, * {
box-sizing: border-box;
}

.v-select.select {
min-width: 220px;
}
}

@media (min-width: 513px) and (max-width: 736px) {
Expand Down