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

Clearer table boundaries on generate UI #2977

Merged
merged 2 commits into from
Nov 14, 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
12 changes: 11 additions & 1 deletion js/pages/cohort-definitions/cohort-definition-manager.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,21 @@
.only-results-checkbox {
}
table.sources-table td.generation-buttons-column {
text-align: right;
text-align: left;
}
table.sources-table thead th, table.sources-table tbody tr:first-child td {
padding: 4px 10px;
}
table.sources-table tr {
transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}
table.sources-table tr:hover {
background-color: #f2f2f2;
}
table.sources-table tr:hover td {
border-top: solid 1px #ccc;
border-bottom: solid 1px #ccc;
}
table.sources-table tbody td {
padding: 0 10px 4px;
}
Expand Down
8 changes: 4 additions & 4 deletions js/pages/cohort-definitions/cohort-definition-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ define(['jquery', 'knockout', 'text!./cohort-definition-manager.html',

this.sourcesTableOptions = commonUtils.getTableOptions('S');
this.sourcesColumns = [{
sortable: false,
className: 'generation-buttons-column',
render: () => `<span data-bind="template: { name: 'generation-buttons', data: $data }"></span>`
}, {
title: `<span>${ko.i18n('cohortDefinitions.cohortDefinitionManager.panels.sourceName', 'Source Name')()}</span>`,
data: 'name'
}, {
Expand All @@ -600,10 +604,6 @@ define(['jquery', 'knockout', 'text!./cohort-definition-manager.html',
}, {
title: ko.i18n('cohortDefinitions.cohortDefinitionManager.panels.generationDuration', 'Generation Duration'),
data: 'executionDuration'
}, {
sortable: false,
className: 'generation-buttons-column',
render: () => `<span data-bind="template: { name: 'generation-buttons', data: $data }"></span>`
}];

this.stopping = ko.pureComputed(() => this.cohortDefinitionSourceInfo().reduce((acc, target) => ({...acc, [target.sourceKey]: ko.observable(false)}), {}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ define([
this.showOnlySourcesWithResults = ko.observable(false);
this.sourcesTableOptions = commonUtils.getTableOptions('S');
this.sourcesColumns = [{
sortable: false,
className: 'generation-buttons-column',
render: () => `<span data-bind="template: { name: 'generation-buttons', data: $data }"></span>`
}, {
title: ko.i18n('cohortDefinitions.cohortDefinitionManager.panels.sourceName', 'Source Name'),
render: (s,p,d) => `${d.source.sourceName}`
}, {
Expand Down Expand Up @@ -144,10 +148,6 @@ define([
}, {
title: ko.i18n('ir.results.duration', 'Duration'),
render: (s,p,d) => d.info() ? `${this.msToTime(d.info().executionInfo.executionDuration)}` : `n/a`
}, {
sortable: false,
className: 'generation-buttons-column',
render: () => `<span data-bind="template: { name: 'generation-buttons', data: $data }"></span>`
}];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@
tbody tr td {
padding: 0 10px 4px;
}
tr {
transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}
tr:hover {
background-color: #f2f2f2;
}
tr:hover td {
border-top: solid 1px #ccc;
border-bottom: solid 1px #ccc;
}
.generation-buttons-column {
text-align: right;
text-align: left;
}
.generation-buttons {
white-space: nowrap;
Expand Down
Loading