Skip to content

Commit e9e67a9

Browse files
authored
[O2B-1136] Unify LHC Periods view styling (#1369)
* refactor * amend test * amend test
1 parent ad9ceee commit e9e67a9

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/public/views/lhcPeriods/ActiveColumns/lhcPeriodsActiveColumns.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ export const lhcPeriodsActiveColumns = {
2828
h('.ph1.mh1.w-10', name),
2929
h('.mh4'),
3030
frontLink(
31-
['Runs', h('sub', `[${runsCount}]`)],
31+
['Runs', h('.badge', `(${runsCount})`)],
3232
'runs-per-lhc-period',
3333
{ lhcPeriodName: name },
34-
{ class: `btn mh1 ${runsCount > 0 ? 'bg-light-blue' : ''}` },
34+
{ class: `mh1 ${runsCount === 0 ? 'gray-darker' : ''}` },
3535
),
36-
frontLink('Data Passes', 'data-passes-per-lhc-period-overview', { lhcPeriodId: id }, { class: 'btn mh1' }),
36+
frontLink('Data Passes', 'data-passes-per-lhc-period-overview', { lhcPeriodId: id }, { class: 'mh1' }),
3737
]),
3838
sortable: true,
3939
filter: ({ namesFilterModel }) => textFilter(

lib/public/views/lhcPeriods/Overview/LhcPeriodsOverviewPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { paginationComponent } from '../../../components/Pagination/paginationCo
1919
import { filtersPanelPopover } from '../../../components/Filters/common/filtersPanelPopover.js';
2020
import { estimateDisplayableRowsCount } from '../../../utilities/estimateDisplayableRowsCount.js';
2121

22-
const TABLEROW_HEIGHT = 42;
22+
const TABLEROW_HEIGHT = 35;
2323
// Estimate of the navbar and pagination elements height total; Needs to be updated in case of changes;
2424
const PAGE_USED_HEIGHT = 215;
2525

test/public/lhcPeriods/overview.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module.exports = () => {
100100
const amountSelectorButton = await page.$('.dropup button');
101101
const amountSelectorButtonText = await amountSelectorButton.evaluate((element) => element.innerText);
102102
await page.waitForTimeout(300);
103-
expect(amountSelectorButtonText.trim().endsWith('9')).to.be.true;
103+
expect(amountSelectorButtonText.trim().endsWith('11')).to.be.true;
104104

105105
// Expect the dropdown options to be visible when it is selected
106106
await amountSelectorButton.evaluate((button) => button.click());
@@ -203,7 +203,7 @@ module.exports = () => {
203203
* @param {string[]} periodNames list of names
204204
* @return {string[]} cells content
205205
*/
206-
const appendButtonsText = (periodNames) => periodNames.map((name) => `${name}\nRuns[${countsPerLhcPeriod[name]}]\nData Passes`);
206+
const appendButtonsText = (periodNames) => periodNames.map((name) => `${name}\nRuns(${countsPerLhcPeriod[name]})\nData Passes`);
207207

208208
let allLhcPeriodNameCellsContent = await getAllDataFields(page, 'name');
209209
expect(allLhcPeriodNameCellsContent).to.has.all.deep.members(appendButtonsText(['LHC22a']));

0 commit comments

Comments
 (0)