mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
fix: pick up and apply font-size in dense listboxes (#1709)
This commit is contained in:
committed by
GitHub
parent
45758938b4
commit
56214c5b54
@@ -145,7 +145,7 @@ const RowColRoot = styled('div', {
|
||||
|
||||
// The leaf node, containing the label text.
|
||||
[`& .${classes.labelText}`]: {
|
||||
lineHeight: '16px',
|
||||
lineHeight: '24px',
|
||||
userSelect: 'none',
|
||||
paddingRight: '1px',
|
||||
...ellipsis,
|
||||
@@ -153,7 +153,7 @@ const RowColRoot = styled('div', {
|
||||
},
|
||||
|
||||
[`& .${classes.labelDense}`]: {
|
||||
fontSize: 12,
|
||||
lineHeight: '18px',
|
||||
},
|
||||
|
||||
// Highlight is added to labelText spans, which are created as children to original labelText,
|
||||
|
||||
@@ -275,6 +275,7 @@ window.getFuncs = function getFuncs() {
|
||||
},
|
||||
layoutOptions: {
|
||||
layoutOrder: 'row',
|
||||
dense: options?.dense ?? false,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
case 'standard':
|
||||
sc = {};
|
||||
break;
|
||||
case 'dense':
|
||||
sc = { dense: true };
|
||||
break;
|
||||
case 'autoConfirm':
|
||||
sc = { autoConfirm: true };
|
||||
break;
|
||||
|
||||
@@ -63,6 +63,23 @@ test.describe('listbox mashup rendering test', () => {
|
||||
return expect(image).toMatchSnapshot(FILE_NAME);
|
||||
});
|
||||
|
||||
test('selecting two values in dense listbox should result in two green rows', async () => {
|
||||
const FILE_NAME = 'listbox_dense_select.png';
|
||||
|
||||
await page.goto(`${url}/listbox/listbox.html?scenario=dense`, { waitUntil: 'networkidle' });
|
||||
const selector = await page.waitForSelector(listboxSelector, { visible: true });
|
||||
|
||||
const selectNumbers = [4, 7];
|
||||
const action = async (nbr) => {
|
||||
const rowSelector = `${listboxSelector} [data-n="${nbr}"]`;
|
||||
await page.click(rowSelector);
|
||||
};
|
||||
await execSequence(selectNumbers, action);
|
||||
|
||||
const image = await selector.screenshot({ caret: 'hide' });
|
||||
return expect(image).toMatchSnapshot(FILE_NAME);
|
||||
});
|
||||
|
||||
test('selecting values should not show the selections toolbar when autoConfirm is true', async () => {
|
||||
const FILE_NAME = 'listbox_select_EH_auto_confirm.png';
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 67 KiB |
Reference in New Issue
Block a user