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

[stable28] fix(files): selected files actions position on scroll/with readme block #43222

Merged
merged 2 commits into from
Feb 3, 2024
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
15 changes: 11 additions & 4 deletions apps/files/src/components/FilesListVirtual.vue
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,21 @@ export default defineComponent({

.files-list__table {
display: block;

&.files-list__table--with-thead-overlay {
// Hide the table header below the overlay
margin-top: calc(-1 * var(--row-height));
}
}

.files-list__thead-overlay {
position: absolute;
// Pinned on top when scrolling
position: sticky;
top: 0;
left: var(--row-height); // Save space for a row checkbox
right: 0;
z-index: 1000;
// Save space for a row checkbox
margin-left: var(--row-height);
// More than .files-list__thead
z-index: 20;

display: flex;
align-items: center;
Expand Down
10 changes: 5 additions & 5 deletions apps/files/src/components/VirtualList.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<div class="files-list" data-cy-files-list>
<div v-if="!!$scopedSlots['header-overlay']" class="files-list__thead-overlay">
<slot name="header-overlay" />
</div>

<!-- Header -->
<div ref="before" class="files-list__before">
<slot name="before" />
</div>

<table class="files-list__table">
<div v-if="!!$scopedSlots['header-overlay']" class="files-list__thead-overlay">
<slot name="header-overlay" />
</div>

<table class="files-list__table" :class="{ 'files-list__table--with-thead-overlay': !!$scopedSlots['header-overlay'] }">
<!-- Accessibility table caption for screen readers -->
<caption v-if="caption" class="hidden-visually">
{{ caption }}
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

Loading