Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
322cf2f
chore: update
SoonIter Aug 11, 2025
c27da2e
chore: lint
SoonIter Sep 12, 2025
bc5419f
chore(PrevNextPage): small fix
SoonIter Sep 12, 2025
7c68b8a
feat(theme/style): keep the <table> html style be consistent with ma…
SoonIter Sep 11, 2025
5ff98cf
chore: fix twoslash
SoonIter Sep 12, 2025
1b162f9
chore: update
SoonIter Sep 18, 2025
aa723d3
chore: update
SoonIter Sep 18, 2025
5814232
chore: BEM NavMenu
SoonIter Sep 19, 2025
856b14c
chore: BEM NewNav
SoonIter Sep 19, 2025
451ec30
fix: navTitle
SoonIter Sep 19, 2025
f0d6e01
chore: BEM Tabs
SoonIter Sep 19, 2025
b25063a
fix: code block color
SoonIter Sep 19, 2025
60e53ce
chore: BEM sidebar
SoonIter Sep 19, 2025
3a04b40
chore: update overview
SoonIter Sep 19, 2025
fe7c2a9
chore: update PrevNextPage
SoonIter Sep 19, 2025
34dd8d2
chore: update
SoonIter Sep 19, 2025
55cdaf4
chore: fix navBar
SoonIter Sep 21, 2025
82c08b2
chore: BEM
SoonIter Sep 21, 2025
d8114bd
chore: fix navBar color
SoonIter Sep 21, 2025
e477c47
fix: color
SoonIter Sep 21, 2025
6d5ada4
chore: add border Toc and sidebar
SoonIter Sep 22, 2025
96118f2
chore: update
SoonIter Sep 22, 2025
7e12b01
chore: update
SoonIter Sep 22, 2025
251056f
chore: complete the doclayout
SoonIter Sep 22, 2025
96908d2
chore: complete the doclayout
SoonIter Sep 22, 2025
10f54a3
chore: ASide BEM
SoonIter Sep 22, 2025
f69cf44
chore: fix the min-heaght
SoonIter Sep 22, 2025
2b48eb2
chore: update
SoonIter Sep 22, 2025
173fee6
chore: update
SoonIter Sep 22, 2025
9af0118
chore: small fix
SoonIter Sep 23, 2025
3d9563c
chore: update
SoonIter Sep 23, 2025
19bd1b4
fix: make Sidebar pure
SoonIter Sep 23, 2025
dd59581
fix: width of sidebar
SoonIter Sep 23, 2025
0c9f20f
chore: update TocItem
SoonIter Sep 23, 2025
4d96aae
fix: z-index of HoverGroup
SoonIter Sep 24, 2025
0726b30
fix: section header
SoonIter Sep 24, 2025
5b6437d
chore: polish the Search
SoonIter Sep 24, 2025
a88d8d6
chore: upgrade search
SoonIter Sep 24, 2025
8f524b4
chore: update container.scss
SoonIter Sep 24, 2025
9677a2f
chore: update
SoonIter Sep 24, 2025
b1419bd
chore: update
SoonIter Sep 24, 2025
753e006
chore: upgrade container codeblock bg
SoonIter Sep 25, 2025
f35e1f0
feat: add FallbackingTitle
SoonIter Sep 25, 2025
3968ac7
refactor: should not pass uiSwitch as props
SoonIter Sep 25, 2025
89b1112
chore: Aside polish
SoonIter Sep 25, 2025
ec95a8a
chore: 404 page
SoonIter Sep 25, 2025
37c0c7f
feat: upgrade socialLinks
SoonIter Sep 25, 2025
c6db2f5
fix: details html dom
SoonIter Sep 25, 2025
fbb5443
fix: algolia crawler
SoonIter Sep 25, 2025
344401b
chore: BEM lastUpdated
SoonIter Sep 25, 2025
f0819be
feat: Overview
SoonIter Sep 25, 2025
79e0d65
feat: Overview
SoonIter Sep 25, 2025
1ed3cdb
chore: update
SoonIter Sep 25, 2025
4fd1353
chore: update Rslib configuration
SoonIter Sep 26, 2025
28063e5
chore: update lint
SoonIter Sep 26, 2025
6abeef9
chore: update BEM
SoonIter Sep 26, 2025
8210442
chore: update
SoonIter Sep 26, 2025
2a9dee7
chore: update
SoonIter Sep 26, 2025
1216037
chore: remove unused scrollPaddingTop
SoonIter Sep 26, 2025
843607f
chore: update
SoonIter Sep 26, 2025
6ebffe8
feat: HomeBackground
SoonIter Sep 28, 2025
58c14f9
chore: BEM SwitchAppearance
SoonIter Sep 28, 2025
6035568
chore: upgrade Aside SidebarMenu
SoonIter Sep 28, 2025
36d3a1b
chore: upgrade Aside SidebarMenu
SoonIter Sep 28, 2025
d6d689a
chore: SidebarMenu animation
SoonIter Sep 28, 2025
12274b0
chore: upgrade Aside SidebarMenu
SoonIter Sep 28, 2025
edcf5f4
chore: upgrade HomeBackground
SoonIter Sep 29, 2025
db144f7
fix: outline
SoonIter Sep 29, 2025
cf01ed4
chore: polish algolia
SoonIter Sep 29, 2025
69f586a
refactor: reimplement containerSyntax
SoonIter Sep 30, 2025
2c45381
chore: header-anchor rename to rp-header-anchor
SoonIter Sep 30, 2025
f1cb99b
feat: toc auto scroll
SoonIter Sep 30, 2025
352a54e
chore: update
SoonIter Sep 30, 2025
23d7a90
chore: update navscreen
SoonIter Sep 30, 2025
475afc3
chore: polish the local nav
SoonIter Oct 1, 2025
0a513fe
chore: update
SoonIter Oct 4, 2025
6818466
chore: rebase and use section-header
SoonIter Oct 9, 2025
8bad501
chore: rebase and use section-header
SoonIter Oct 9, 2025
8b69818
chore: small fix
SoonIter Oct 9, 2025
dd3965b
chore: polish search
SoonIter Oct 9, 2025
023f0a2
chore: Search BEM
SoonIter Oct 9, 2025
e761eda
chore: Search BEM update
SoonIter Oct 9, 2025
f2fd03a
chore: make scrollbar light
SoonIter Oct 9, 2025
8440709
chore: adjust homeLayout
SoonIter Oct 9, 2025
e981e9d
fix: small fix
SoonIter Oct 9, 2025
0e33ddb
fix: small fix
SoonIter Oct 9, 2025
084754c
fix: small fix, unused css
SoonIter Oct 9, 2025
f982f5f
docs: adjust doc
SoonIter Oct 9, 2025
51b0f6e
chore: update
SoonIter Oct 9, 2025
1128fcb
feat: support frontmatter.tag
SoonIter Oct 9, 2025
5c88c53
chore: update menu
SoonIter Oct 9, 2025
4b5caa4
chore: update the visible anchors
SoonIter Oct 9, 2025
1a36add
chore: fix the useActiveAnchor
SoonIter Oct 9, 2025
84cb5b1
chore: update
SoonIter Oct 9, 2025
29e9dc7
chore: update the Nav Badge
SoonIter Oct 10, 2025
07cedee
chore: update the NavBadage
SoonIter Oct 10, 2025
d4ab4f4
chore: update
SoonIter Oct 10, 2025
e4d3155
chore: update NavHambergur
SoonIter Oct 11, 2025
3804612
fix: small fix
SoonIter Oct 11, 2025
0787125
fix: table font color
SoonIter Oct 11, 2025
3a4b840
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
1410d11
test(e2e): upgrade test e2e inline-markdown
SoonIter Oct 11, 2025
fe12aae
test(e2e): upgrade test e2e nested-overview
SoonIter Oct 11, 2025
a229ca1
test(e2e): upgrade test e2e auto-nav-sidebar-dir-convention issue-1309
SoonIter Oct 11, 2025
a69ec8c
test(e2e): upgrade test e2e plugin-typedoc
SoonIter Oct 11, 2025
b0b3b8c
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
1929857
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
11c37c0
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
0ce6bde
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
1cd77c3
chore: replace the old nav
SoonIter Oct 11, 2025
46b0185
chore: remove hideNavbar
SoonIter Oct 11, 2025
14cf817
chore!: remove uiSwitch
SoonIter Oct 11, 2025
feb399a
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
130fe57
test(e2e): upgrade test e2e
SoonIter Oct 11, 2025
f368980
Initial plan
Copilot Oct 12, 2025
b8d5614
Refactor multi-version, title-number, production, no-config-root, and…
Copilot Oct 12, 2025
2e57daf
Refactor replace-rules, public-dir, tabs-component, search-algolia, m…
Copilot Oct 12, 2025
77e06e6
Refactor auto-nav-sidebar test to use modern Playwright APIs
Copilot Oct 12, 2025
1d35196
Refactor remaining e2e tests to use modern Playwright APIs (github-al…
Copilot Oct 12, 2025
ea5b389
Initial plan
Copilot Oct 12, 2025
2736531
Update e2e tests with new DOM selectors (rp- prefix)
Copilot Oct 12, 2025
1312d4b
Update page-type-home e2e test with new hero and feature selectors
Copilot Oct 12, 2025
76da38d
chore: update e2e
SoonIter Oct 12, 2025
debae5a
chore: update e2e
SoonIter Oct 12, 2025
e805742
test(e2e): upgrade test e2e
SoonIter Oct 13, 2025
e8e3bc6
test(e2e): upgrade test e2e - should pass nav
SoonIter Oct 13, 2025
80fccce
test: upgrade unit
SoonIter Oct 13, 2025
876bc25
test: upgrade i18n and plugin-preview
SoonIter 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
  •  
  •  
  •  
105 changes: 43 additions & 62 deletions e2e/fixtures/auto-nav-sidebar-dir-convention/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { getSidebar, getSidebarTexts } from '../../utils/getSideBar';
import { getPort, killProcess, runDevCommand } from '../../utils/runCommands';

test.describe('Auto nav and sidebar dir convention', async () => {
let appPort;
let app;
let appPort: number;
let app: Awaited<ReturnType<typeof runDevCommand>>;
test.beforeAll(async () => {
const appDir = __dirname;
appPort = await getPort();
Expand All @@ -25,14 +25,15 @@ test.describe('Auto nav and sidebar dir convention', async () => {
});

const sidebarTexts = await getSidebarTexts(page);
expect(sidebarTexts.length).toBe(7);
expect(sidebarTexts.length).toBe(8);
expect(sidebarTexts.join(',')).toEqual(
[
'/guide Page',
'index md convention',
'index mdx convention',
'same name',
'index in metaIndex in meta',
'index in meta',
'Index in meta',
'no meta md',
'no meta mdx',
].join(','),
Expand All @@ -45,7 +46,11 @@ test.describe('Auto nav and sidebar dir convention', async () => {
await page.goto(`http://localhost:${appPort}/guide/`, {
waitUntil: 'networkidle',
});
await page.click('.rspress-scrollbar nav section div');
await page
.locator(
'.rp-doc-layout__sidebar .rp-sidebar-item[data-context="context-index-md-convention"]',
)
.click();
await page.waitForURL('**/index-md-convention/**');
expect(page.url()).toBe(
`http://localhost:${appPort}/guide/index-md-convention/index.html`,
Expand All @@ -56,71 +61,47 @@ test.describe('Auto nav and sidebar dir convention', async () => {
await page.goto(`http://localhost:${appPort}/guide/`, {
waitUntil: 'networkidle',
});
const itemsWithContext = await page
.locator('.rp-doc-layout__sidebar .rp-sidebar-item[data-context]')
.evaluateAll(sidebarNodes =>
sidebarNodes
.map(node => node.getAttribute('data-context'))
.filter((context): context is string => Boolean(context)),
);
expect(itemsWithContext).toEqual([
'context-index-md-convention',
'context-index-mdx-convention',
'context-same-name',
'context-index-in-meta',
'context-no-meta-md',
'context-no-meta-mdx',
]);

const sidebarGroupSections = await page.$$('.rspress-sidebar-section');

// first level
const contexts1 = await page.evaluate(
sidebars =>
sidebars?.map(sidebar => sidebar.getAttribute('data-context')),
sidebarGroupSections,
);
expect(contexts1.join(',')).toEqual(
[
'context-index-md-convention',
'context-index-mdx-convention',
'context-same-name',
'',
'context-no-meta-md',
'context-no-meta-mdx',
].join(','),
);

const sidebarGroupCollapses = await page.$$('.rspress-sidebar-collapse');
const contexts2 = await page.evaluate(
sidebars =>
sidebars?.map(sidebar => sidebar.getAttribute('data-context')),
sidebarGroupCollapses,
);
expect(contexts2.join(',')).toEqual(
[
'context-index-md-convention',
'context-index-mdx-convention',
'context-same-name',
'',
'context-no-meta-md',
'context-no-meta-mdx',
].join(','),
);

const sidebarGroupItems = await page.$$('.rspress-sidebar-item');
const contexts3 = await page.evaluate(
sidebarGroupConfig =>
sidebarGroupConfig?.map(sidebarItem =>
sidebarItem.getAttribute('data-context'),
),
sidebarGroupItems,
);
// added container `div.rspress-sidebar-item` to ( depth=0 & type=file )'s sidebar item
// so have to modify this test result
expect(contexts3.join(',')).toEqual(
['', 'context-index-in-meta'].join(','),
);
const nestedContexts = await page
.locator(
'.rp-doc-layout__sidebar .rp-sidebar-item[data-depth="1"][data-context]',
)
.evaluateAll(sidebarNodes =>
sidebarNodes
.map(node => node.getAttribute('data-context'))
.filter((context): context is string => Boolean(context)),
);
expect(nestedContexts).toEqual(['context-index-in-meta']);
});

test('/api/config/index.html /api/config/index /api/config should be the same page', async ({
page,
}) => {
async function getSidebarLength(): Promise<number> {
return ((await getSidebar(page)) ?? []).length;
return getSidebar(page).count();
}

async function isMenuItemActive(): Promise<boolean> {
const activeMenuItem = await page.$(
'.rspress-sidebar-collapse[class*="menuItemActive"]',
const activeMenuItem = page.locator(
'.rp-doc-layout__sidebar .rp-sidebar-item--active .rp-sidebar-item__left span',
);
const content = await activeMenuItem?.textContent();
return content === 'index md convention';
const content = await activeMenuItem.textContent();
return content?.trim() === 'index md convention';
}
// /api/config/index.html
await page.goto(
Expand All @@ -129,7 +110,7 @@ test.describe('Auto nav and sidebar dir convention', async () => {
waitUntil: 'networkidle',
},
);
expect(await getSidebarLength()).toBe(7);
expect(await getSidebarLength()).toBe(8);
expect(await isMenuItemActive()).toBe(true);

// /api/config/index
Expand All @@ -139,14 +120,14 @@ test.describe('Auto nav and sidebar dir convention', async () => {
waitUntil: 'networkidle',
},
);
expect(await getSidebarLength()).toBe(7);
expect(await getSidebarLength()).toBe(8);
expect(await isMenuItemActive()).toBe(true);

// /api/config
await page.goto(`http://localhost:${appPort}/guide/index-md-convention`, {
waitUntil: 'networkidle',
});
expect(await getSidebarLength()).toBe(7);
expect(await getSidebarLength()).toBe(8);
expect(await isMenuItemActive()).toBe(true);
});
});
8 changes: 4 additions & 4 deletions e2e/fixtures/auto-nav-sidebar-issue-1682/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { getSidebarTexts } from '../../utils/getSideBar';
import { getPort, killProcess, runDevCommand } from '../../utils/runCommands';

test.describe('Auto nav and sidebar dir issue-1682', async () => {
let appPort;
let app;
let appPort: number;
let app: Awaited<ReturnType<typeof runDevCommand>>;
test.beforeAll(async () => {
const appDir = __dirname;
appPort = await getPort();
Expand All @@ -25,9 +25,9 @@ test.describe('Auto nav and sidebar dir issue-1682', async () => {
});

const sidebarTexts = await getSidebarTexts(page);
expect(sidebarTexts.length).toBe(2);
expect(sidebarTexts.length).toBe(3);
expect(sidebarTexts.join(',')).toEqual(
['Second sub-directorytest', 'First sub-directory'].join(','),
['Second sub-directory', 'test', 'First sub-directory'].join(','),
);
});
});
44 changes: 25 additions & 19 deletions e2e/fixtures/auto-nav-sidebar-no-meta/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { getSidebarTexts } from '../../utils/getSideBar';
import { getPort, killProcess, runDevCommand } from '../../utils/runCommands';

test.describe('Auto nav and sidebar test', async () => {
let appPort;
let app;
let appPort: number;
let app: Awaited<ReturnType<typeof runDevCommand>>;
test.beforeAll(async () => {
const appDir = __dirname;
appPort = await getPort();
Expand All @@ -23,16 +23,19 @@ test.describe('Auto nav and sidebar test', async () => {
});

const sidebarTexts = await getSidebarTexts(page);
expect(sidebarTexts.length).toBe(2);
expect(sidebarTexts.join(',')).toEqual(
[
'API',
'pluginPlugin aPlugin b',
'Commands',
'configBasic configBuild configFront matter configTheme config,',
'HomePage',
].join(''),
);
expect(sidebarTexts).toEqual([
'API',
'plugin',
'Plugin a',
'Plugin b',
'Commands',
'config',
'Basic config',
'Build config',
'Front matter config',
'Theme config',
'HomePage',
]);
});

test('Should click the directory and navigate to the index page', async ({
Expand All @@ -42,13 +45,16 @@ test.describe('Auto nav and sidebar test', async () => {
waitUntil: 'networkidle',
});

const elements = await page.$$('h2 span');
expect(elements.length).toBe(3);

const configDir = elements[2];
expect(await configDir.textContent()).toBe('config');
await configDir.click();
expect(page.url()).toBe(
const configLink = page
.locator('.rp-doc-layout__sidebar .rp-sidebar-item[data-depth="1"]')
.filter({
has: page.locator('.rp-sidebar-item__left span', {
hasText: /^config$/,
}),
});
await expect(configLink).toHaveCount(1);
await configLink.first().click();
await expect(page).toHaveURL(
`http://localhost:${appPort}/api/rspress-config/index.html`,
);
});
Expand Down
Loading
Loading