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

'Fix' Actions column in editor #303

Merged
merged 6 commits into from
Jan 20, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function ItemList( props: ItemListProps ) {
id: field,
label: field ?? '',
enableGlobalSearch: true,
getValue: ( { item }: { item: RemoteDataResult } ) => item[ field ] as string,
render:
field === media
? ( { item }: { item: RemoteDataResult } ) => {
Expand Down
32 changes: 25 additions & 7 deletions src/blocks/remote-data-container/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ remote-data-blocks-inline-field {

.dataviews-view-table tbody .dataviews-view-table__cell-content-wrapper {
white-space: normal;
width: 300px;
width: 250px;
max-width: 100%;
min-width: 150px;
overflow-wrap: break-word;
overflow-wrap: anywhere;
}

.dataviews-view-table__row .dataviews-view-table__actions-column .components-button.is-compact.has-icon:not(.has-text) {
Expand All @@ -112,11 +112,6 @@ remote-data-blocks-inline-field {
vertical-align: middle;
}

.dataviews-view-table tr td:last-child,
.dataviews-view-table tr th:last-child {
padding-left: 48px;
}

.rdb-editor_data-views-modal .components-modal__content {
padding: 0;

Expand All @@ -128,3 +123,26 @@ remote-data-blocks-inline-field {
padding: 4px 32px 32px;
}
}


.dataviews-view-table tr th.dataviews-view-table__actions-column,
.dataviews-view-table tr td.dataviews-view-table__actions-column {
position: sticky;
right: 0;
background: #fff;
z-index: 1;
padding-left: 24px;
padding-right: 24px;
text-align: center;
}

td.dataviews-view-table__actions-column::before {
content: "";
position: absolute;
top: 0;
left: -1px;
width: 1px;
height: 100%;
background-color: #f0f0f0;
z-index: 2;
}
Loading