Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
f7caa2b
[ellipsis] fixed trim=middle behavior
ilyabrower Jul 2, 2025
336813b
[ellipsis] fixed trim=middle with different font-size
ilyabrower Jul 2, 2025
12468ee
[ellipsis, typography] init ellipsis as text property
ilyabrower Jul 2, 2025
35f42c5
[chore] added new hint component
ilyabrower Jul 3, 2025
9dcc69c
[ellipsis, typography] init ellipsis as text property
ilyabrower Jul 4, 2025
a73ed87
Merge remote-tracking branch 'origin/release/v16' into UIK-3879/fixed…
slizhevskyv-semrush Jul 7, 2025
63b47af
[stories] added more props in ellipsis stories
Valeria-Zimnitskaya Jul 7, 2025
3000289
[stories] added test story with specific text size
Valeria-Zimnitskaya Jul 7, 2025
a05494e
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-38…
ilyabrower Jul 24, 2025
6b34a84
[chore] Merge branch 'UIK-3879/fixed-middel-trim-in-ellipsis' into UI…
ilyabrower Jul 24, 2025
307b314
[ellipsis] UIK-3917 added conditional args to stories
ilyabrower Jul 25, 2025
3c299d5
[ellipsis] UIK-3917 added comment in docs
ilyabrower Jul 25, 2025
70dd5d6
[UIK-3879][ellipsis] fixed trim=middle behavior (#2304)
ilyabrower Jul 25, 2025
8ca531b
[ellipsis] the same behavior as on prod - with trim middle - always o…
ilyabrower Jul 25, 2025
3b787e3
[chore] Merge branch 'UIK-2194/ellipsis-middle-diff-font-size' of git…
ilyabrower Jul 25, 2025
f102c6d
[ellipsis] even displayedSymbols
ilyabrower Jul 25, 2025
9fdd71b
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Jul 25, 2025
d1ef679
[chore] Merge branch 'UIK-2194/ellipsis-middle-diff-font-size' into U…
ilyabrower Jul 25, 2025
891350b
[base-components] added new Hint component and useEllipsis hook
ilyabrower Jul 28, 2025
abaa758
[chore] typo fixes after review
ilyabrower Jul 29, 2025
38b8a4d
[website] added docs about new useEllipsis and Hint
ilyabrower Jul 29, 2025
1ffb06e
[chore] updated stories with new useEllipsis
ilyabrower Jul 30, 2025
6450ee6
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Jul 30, 2025
bfda6b4
[chore] added hintProps for components with new ellipsis
ilyabrower Jul 30, 2025
3854d9f
[chore] fixed deps
ilyabrower Jul 30, 2025
33fb56a
[chore] fixed build
ilyabrower Jul 30, 2025
d774b3f
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Jul 31, 2025
c5368a7
[chore] updated snapshots
ilyabrower Jul 31, 2025
a4f9165
[breadcrumbs] fixed tests
ilyabrower Aug 1, 2025
1ac27a6
[fullscreen-modal] fixed tests
ilyabrower Aug 1, 2025
69aa581
[data-table] fixed tests with ellipsis
ilyabrower Aug 1, 2025
deced57
[card] fixed tests
ilyabrower Aug 1, 2025
3662c1a
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Aug 1, 2025
ec2feb4
[base-components] ellipsis animations
ilyabrower Aug 1, 2025
9d13920
[chore] Merge branch 'release/v16' into UIK-2976/ellipsis-improvements
ilyabrower Aug 4, 2025
4b1f00e
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Aug 5, 2025
4a5a357
[breadcrumbs] update some snapshots
Valeria-Zimnitskaya Aug 6, 2025
5110dc4
[breadcrumbs] update some snapshots
Valeria-Zimnitskaya Aug 6, 2025
964c26a
[ellipsis] fixed trim=middle with different font-size
ilyabrower Aug 8, 2025
46d7231
[ellipsis] hint styles and timeout
sheila-semrush Aug 11, 2025
2a73a9c
Update semcore/base-components/src/components/hint/Hint.tsx
ilyabrower Aug 12, 2025
8c26a1f
[ellipsis] updated changelog
sheila-semrush Aug 14, 2025
5bcfc8f
[docs] ellipsis draft docs update
sheila-semrush Aug 14, 2025
f142fb1
[breadcrumbs] update test and snapshots for new ellipsis
Valeria-Zimnitskaya Aug 18, 2025
247c3cc
[ellipsis] added base components story foldes and update base trigger…
Valeria-Zimnitskaya Aug 18, 2025
48e653d
[docs] separated old and new Multiple Use examples for ellipsis
sheila-semrush Aug 18, 2025
225c371
[fullscreen-modal] update tests and snapshots
Valeria-Zimnitskaya Aug 19, 2025
e85eba6
[input-tags] update snapshots
Valeria-Zimnitskaya Aug 19, 2025
306875c
[base-components] added ellipsis test stories
Valeria-Zimnitskaya Aug 20, 2025
2571b40
[data-table] upd story
Valeria-Zimnitskaya Aug 20, 2025
54de8ca
[base-components] hint test story
Valeria-Zimnitskaya Aug 20, 2025
94a76bf
[docs] restored old examples to ellipsis-code and interlinked all pages
sheila-semrush Aug 20, 2025
47a62a9
[docs] added hint examples and docs
sheila-semrush Aug 22, 2025
cca58d2
[docs] removed Hint playground
sheila-semrush Aug 22, 2025
351cb35
[stories] UIK-4097
ilyabrower Aug 25, 2025
e0f4acc
[stories] UIK-4101
ilyabrower Aug 25, 2025
8fb3582
[base-components] not set display by default
ilyabrower Aug 25, 2025
49646e7
[base-components] fixed ellipsis for multi=line
ilyabrower Aug 25, 2025
b56532f
[base-components] fixed hint arrow
ilyabrower Aug 25, 2025
3929e80
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Aug 26, 2025
4b902e0
[base-components] update ellipsis test story
Valeria-Zimnitskaya Aug 26, 2025
ba958a3
[stories] UIK-4015
ilyabrower Aug 26, 2025
dca4dda
[chore] Merge branch 'UIK-2976/ellipsis-improvements' of github.com:s…
ilyabrower Aug 26, 2025
8fda3c1
[stories] UIK-4096 serp-filter ellipsis issue
ilyabrower Aug 26, 2025
8b631c1
[docs] fixed double Hint in examples
sheila-semrush Aug 26, 2025
8fa062c
[base-trigger] update snapshots
Valeria-Zimnitskaya Aug 27, 2025
95bed85
Merge branch 'release/v16' into UIK-2976/ellipsis-improvements
Valeria-Zimnitskaya Aug 27, 2025
4732f40
[base-components] update snapshots with new allipsis
Valeria-Zimnitskaya Aug 27, 2025
5b6e5fb
[stories] fixed UIK-4130
ilyabrower Aug 27, 2025
b142a7a
[base-components] added some tests for hint
Valeria-Zimnitskaya Aug 27, 2025
87c2a31
[base-components] fixed ellipsis after GH comments
ilyabrower Aug 27, 2025
95081b8
[chore] Merge branch 'UIK-2976/ellipsis-improvements' of github.com:s…
ilyabrower Aug 27, 2025
f4a5713
[stories] base ellipsis and hint - fixed types
ilyabrower Aug 28, 2025
f5f1855
[base-components] update story
Valeria-Zimnitskaya Aug 28, 2025
4d6b30e
[stories] fixed ellipsis example
ilyabrower Aug 28, 2025
de46914
[chore] Merge branch 'release/v16' into UIK-2976/ellipsis-improvements
ilyabrower Aug 29, 2025
a1ba4fd
[stories] changed hint placement in multiple use example
sheila-semrush Aug 29, 2025
10d4787
[chore] Merge branch 'release/v16' into UIK-2976/ellipsis-improvements
ilyabrower Sep 1, 2025
b86b35a
[typography] fixed types for hintProps
ilyabrower Sep 1, 2025
6bd7955
[stories] added constols for test ellipsis stories
Valeria-Zimnitskaya Sep 1, 2025
9fc8378
[base-components] ellipsis and hint tests
Valeria-Zimnitskaya Sep 1, 2025
eb1844d
[base-components] update tests for ellipsis and hint
Valeria-Zimnitskaya Sep 1, 2025
0357981
[chore] Merge remote-tracking branch 'origin/release/v16' into UIK-29…
ilyabrower Sep 30, 2025
b3d5163
[chore] Merge branch 'release/v16' into UIK-2976/ellipsis-improvements
ilyabrower Oct 10, 2025
989a594
[base-components] update ellipsis tests and snapshots
Valeria-Zimnitskaya Oct 10, 2025
a982134
[ellipsis] update tests
Valeria-Zimnitskaya Oct 10, 2025
49012d7
[base-components] update tests
Valeria-Zimnitskaya Oct 10, 2025
41b1912
[base-components] update test
Valeria-Zimnitskaya Oct 10, 2025
e6041c9
[side-panel] upd snapshots
Valeria-Zimnitskaya Oct 10, 2025
8e330a9
[tag] upd snapshots
Valeria-Zimnitskaya Oct 10, 2025
4bdd2a0
[select] fixed deps
ilyabrower Oct 13, 2025
0da769c
[website] added info about select.option.text
ilyabrower Oct 13, 2025
898895b
[ellipsis] update test
Valeria-Zimnitskaya Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
70 changes: 62 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions semcore/base-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).

## [16.5.0] - 2025-12-12

### Added

- `useEllipsis` hook.
- `Hint` component.

## [16.4.0] - 2025-10-03

### Changed
Expand Down
112 changes: 112 additions & 0 deletions semcore/base-components/__tests__/ellipsis.browser-test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { e2eStandToHtml } from '@semcore/testing-utils/e2e-stand';
import { expect, test } from '@semcore/testing-utils/playwright';

test.describe('Visual - link', () => {
const withEllipsis = [
{ ellipsis: true },
{ ellipsis: { trim: 'middle' } },
{ ellipsis: { trim: 'end' } },
{ ellipsis: { trim: 'end', maxLine: 2 } },
{ ellipsis: { maxLine: 2 } },
];

withEllipsis.forEach((item) => {
test(`Verify ellipsis by @keyboard focus and @mouse hover Link on link when ${JSON.stringify(item.ellipsis)}`, async ({ page }) => {
const standPath =
'stories/components/base-components/ellipsis/tests/examples/link_with_ellipsis.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', item);
await page.setContent(htmlContent);

await page.keyboard.press('Tab');
await page.getByRole('link').hover();
await page.locator('[class*="HintPopper"]').waitFor({ state: 'visible' });
await expect(page.locator('[class*="HintPopper"]')).toHaveCount(1);
await expect(page).toHaveScreenshot();
});

test(`Verify ellipsis by @mouse hover on Link when ${JSON.stringify(item.ellipsis)}`, async ({ page }) => {
const standPath =
'stories/components/base-components/ellipsis/tests/examples/link_with_ellipsis.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', item);
await page.setContent(htmlContent);

await page.getByRole('link').hover();
await page.locator('[class*="HintPopper"]').waitFor({ state: 'visible' });
await expect(page.locator('[class*="HintPopper"]')).toHaveCount(1);
await expect(page).toHaveScreenshot();
});
});

const withoutEllipsis = [
{ ellipsis: false },
{ ellipsis: { trim: 'end', maxLine: 6 } },
];

withoutEllipsis.forEach((item) => {
test(`Verify no ellipsis on Link when ${JSON.stringify(item.ellipsis)}`, async ({ page }) => {
const standPath =
'stories/components/base-components/ellipsis/tests/examples/link_with_ellipsis.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', item);
await page.setContent(htmlContent);

await page.keyboard.press('Tab');
await expect(page.locator('[class*="HintPopper"]')).toHaveCount(0);
await expect(page).toHaveScreenshot();

await page.keyboard.press('Tab');
await page.getByRole('link').hover();
await expect(page.locator('[class*="HintPopper"]')).toHaveCount(0);
});
});
});

test.describe('Visual - text', () => {
const withEllipsis = [
{ ellipsis: true, size: 100 },
{ ellipsis: { trim: 'end' }, size: 200 },
{ ellipsis: true, size: 200 },
{ ellipsis: { trim: 'end' }, size: 400 },
{ ellipsis: true, size: 500 },
{ ellipsis: { trim: 'end' }, size: 600 },
{ ellipsis: true, size: 700 },
{ ellipsis: { trim: 'end' }, size: 800 },
{ ellipsis: { trim: 'middle' }, size: 100 },
{ ellipsis: { trim: 'middle' }, size: 200 },
{ ellipsis: { trim: 'middle' }, size: 300 },
{ ellipsis: { trim: 'middle' }, size: 400 },
{ ellipsis: { trim: 'middle' }, size: 500 },
{ ellipsis: { trim: 'middle' }, size: 600 },
{ ellipsis: { trim: 'middle' }, size: 700 },
{ ellipsis: { trim: 'middle' }, size: 800 },

];

withEllipsis.forEach((item) => {
test(`Verify ellipsis on Text when ellipsis ${JSON.stringify(item.ellipsis)} and text size =${item.size} `, async ({ page }) => {
const standPath =
'stories/components/base-components/ellipsis/tests/examples/trim_with_special_text_size.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', item);
await page.setContent(htmlContent);
await page.locator('[data-ui-name="Text"]').hover();
await page.locator('[class*="HintPopper"]').waitFor({ state: 'visible' });
await expect(page.locator('[class*="HintPopper"]')).toHaveCount(1);
await expect(page).toHaveScreenshot();
});
});

const withoutEllipsis = [
{ ellipsis: false },
{ ellipsis: { trim: 'end', maxLine: 6 } },
];

withoutEllipsis.forEach((item) => {
test(`Verify no ellipsis on Text when ellipsis ${JSON.stringify(item.ellipsis)} `, async ({ page }) => {
const standPath =
'stories/components/base-components/ellipsis/tests/examples/trim_with_special_text_size.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', item);
await page.setContent(htmlContent);
await page.locator('[data-ui-name="Text"]').hover();
await expect(page.locator('[class*="HintPopper"]')).toHaveCount(0);
});
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions semcore/base-components/__tests__/hint.browser-test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { e2eStandToHtml } from '@semcore/testing-utils/e2e-stand';
import { expect, test } from '@semcore/testing-utils/playwright';

test.describe('Visual', () => {
const placements = [
{ placement: 'top-start' },
{ placement: 'top' },
{ placement: 'top-end' },
{ placement: 'left-start' },
{ placement: 'left' },
{ placement: 'left-end' },
{ placement: 'right-start' },
{ placement: 'right' },
{ placement: 'right-end' },
{ placement: 'bottom-start' },
{ placement: 'bottom' },
{ placement: 'bottom-end' },
];

placements.forEach((item) => {
test(`Verify Hint for placements ${item.placement}`, async ({ page }) => {
const standPath = 'stories/components/base-components/hint/tests/examples/base-example-props.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', item);
await page.setContent(htmlContent);

await page.keyboard.press('Tab');
await page.getByText('Export to PDF').waitFor({ state: 'visible' });
await expect(page.getByText('Export to PDF')).toHaveCount(1);

await expect(page).toHaveScreenshot();
});
});
});

test.describe('Functional', () => {
test('Verify Hint visible = true', async ({ page }) => {
const standPath = 'stories/components/base-components/hint/tests/examples/base-example-props.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', { visible: true });
await page.setContent(htmlContent);

await page.keyboard.press('Tab');
await page.getByText('Export to PDF').waitFor({ state: 'visible' });
await expect(page.getByText('Export to PDF')).toHaveCount(1);
});

test('Verify Hint visible = false', async ({ page }) => {
const standPath = 'stories/components/base-components/hint/tests/examples/base-example-props.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', { visible: false });
await page.setContent(htmlContent);

await page.keyboard.press('Tab');
await expect(page.getByText('Export to PDF')).toHaveCount(0);
});

test('Verify Hint default visible true ', async ({ page }) => {
const standPath = 'stories/components/base-components/hint/tests/examples/base-example-props.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', { defaultVisible: true });
await page.setContent(htmlContent);

await page.getByText('Export to PDF').waitFor({ state: 'visible' });
await expect(page.getByText('Export to PDF')).toHaveCount(1);

await page.getByRole('button').hover();
await page.keyboard.press('Tab');
await expect(page.getByText('Export to PDF')).toHaveCount(1);
});

test('Verify Hint default visible false ', async ({ page }) => {
const standPath = 'stories/components/base-components/hint/tests/examples/base-example-props.tsx';
const htmlContent = await e2eStandToHtml(standPath, 'en', { defaultVisible: false });
await page.setContent(htmlContent);

await expect(page.getByText('Export to PDF')).toHaveCount(0);

await page.getByRole('button').hover();
await page.keyboard.press('Tab');
await expect(page.getByText('Export to PDF')).toHaveCount(1);
});
});
Loading
Loading