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

[Bug] Prev/Next links are wrong for pages with similar routes #29

Closed
semicolin opened this issue Mar 7, 2023 · 2 comments
Closed

[Bug] Prev/Next links are wrong for pages with similar routes #29

semicolin opened this issue Mar 7, 2023 · 2 comments
Assignees
Labels

Comments

@semicolin
Copy link

Is this a regression?

I don't know

Description

I have two pages and the first page's route is a substring of the second page's route. The prevPage and nextPage links are incorrect on the second page because it is matching the route of the first page.

The generated context.navigation looks like:

		navigation: [
			{
				title: 'Components',
				route: '/components',
				expandable: true,
				expanded: true,
				children: [
			{
				title: 'Chart',
				route: '/components/chart',
			},
			{
				title: 'Chart Summary',
				route: '/components/chart-summary',
			},

Likely source location of the bug:
https://github.com/skoropadas/ng-doc/blob/ca28b10b460a52091ca5a27f7175ae50c0170397/libs/app/components/page/page.component.ts#L24-L31

Please provide the exception or error you saw

No response

OS

Unix (Linux, macOS, etc.)

Browser

Chrome

Node version

18.12.1

Anything else?

No response

@semicolin semicolin added the Type: Bug Something isn't working label Mar 7, 2023
skoropadas pushed a commit that referenced this issue Mar 7, 2023
# [15.7.0](v15.6.0...v15.7.0) (2023-03-07)

### Bug Fixes

* **app:** filter for entity type on the api list page doesn't display type icons ([eeb8bdd](eeb8bdd))
* **app:** global CSS styles leak into component demos ([91727f5](91727f5)), closes [#28](#28)
* **app:** prev/next links are wrong for pages with similar routes ([3cdf42a](3cdf42a)), closes [#29](#29)
* **app:** remove warning about `beautify-html` library ([714f3c7](714f3c7))
* **builder:** `onlyForTags` property of the page/category configuration object should contain project configuration name like `production` or `development` ([9aebc99](9aebc99))

### Features

* **app:** `toc` is generated based on headers with id given header level ([96cd9e2](96cd9e2))
* **app:** add `anchorHeadings` to the `NgDocConfiguration` interface, that can be used to limit the headings for which anchor links should be generated ([10aaa20](10aaa20)), closes [#27](#27)
* **app:** filter by entity name on the api list page is focused by default ([865d0a4](865d0a4))
* **app:** replace `ngDoc` configuration field in `angular.json` with `ng-doc.config.js` file ([e2c9b6c](e2c9b6c)), closes [#20](#20)
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

🎉 This issue has been resolved in version 15.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

skoropadas pushed a commit that referenced this issue Mar 13, 2023
# [15.0.0-beta.34](v15.0.0-beta.33...v15.0.0-beta.34) (2023-03-13)

### Bug Fixes

* **add:** `add` command adds deprecated configuration ([dbaf75b](dbaf75b))
* **add:** path error, if `ngDoc` configuration in `angular.json` is not provided ([03a57ad](03a57ad))
* **app:** copy code button changes style based on global theme ([c2e2f4e](c2e2f4e))
* **app:** filter for entity type on the api list page doesn't display type icons ([eeb8bdd](eeb8bdd))
* **app:** global CSS styles leak into component demos ([f8d615a](f8d615a)), closes [#28](#28)
* **app:** missing dependency js-beautify ([fa1a8e3](fa1a8e3)), closes [#22](#22)
* **app:** next page button is aligned to the left if there is no previous page ([017560b](017560b))
* **app:** ng-doc does not use the `tsConfig` passed in the global configuration ([3dfd5cc](3dfd5cc))
* **app:** playground's type controls are not provided ([458ab4a](458ab4a))
* **app:** prev/next links are wrong for pages with similar routes ([3cdf42a](3cdf42a)), closes [#29](#29)
* **app:** previous page button display on the right side of the page ([b32d978](b32d978))
* **app:** previous/next buttons have wrong background color for dark themes ([90bf376](90bf376))
* **app:** remove warning about `beautify-html` library ([714f3c7](714f3c7))
* **app:** some dependencies are not installed ([0c57d6c](0c57d6c)), closes [#30](#30)
* **app:** toc visual fixes, now it is easier to visually determine the level of the element ([449c0f0](449c0f0))
* **builder:** `onlyForTags` property of the page/category configuration object should contain project configuration name like `production` or `development` ([9aebc99](9aebc99))
* **builder:** add `Page` suffix for `page` schematic ([88b92d3](88b92d3))
* **builder:** api scopes are not sorted by `order` field ([b07598c](b07598c))
* **builder:** demo viewer doesn't show source code ([73ffe77](73ffe77))
* **builder:** paths are generated incorrectly on Windows ([9cbda4c](9cbda4c)), closes [#25](#25)
* **builder:** replace `ts-node` config loader with `swc` ([b0df84f](b0df84f))
* **builder:** types to some properties are defined as any ([5bc231c](5bc231c))
* **builder:** update builder imports ([a4ef8c3](a4ef8c3))
* **builder:** using the `browser` builder, `ng build` completes successfully but doesn't exit ([25bebac](25bebac)), closes [#7](#7)
* **builder:** wrong links generated for duplicate class names ([f8c34e2](f8c34e2)), closes [#1](#1)
* **core:** search bar shows "Unknown" ([ee53a18](ee53a18)), closes [#6](#6)
* **project:** push a stuck release ([c66a867](c66a867))
* **ui-kit:** the primary color is too bright for the light theme ([e5e2c74](e5e2c74))

### Features

* **app:** `toc` is generated based on headers with id given header level ([96cd9e2](96cd9e2))
* **app:** add "Previous/Next Page" links to guide pages ([01bd3fd](01bd3fd)), closes [#19](#19)
* **app:** add `anchorHeadings` to the `NgDocConfiguration` interface, that can be used to limit the headings for which anchor links should be generated ([10aaa20](10aaa20)), closes [#27](#27)
* **app:** add `NgDocCustomNavbarDirective`, `NgDocCustomSidebarDirective` for custom components ([f5ae230](f5ae230))
* **app:** add `scope` filter for api list ([911196c](911196c)), closes [#23](#23)
* **app:** add dark purple theme ([fce107f](fce107f))
* **app:** add glass effect to the header ([0833db3](0833db3))
* **app:** add more options to configure `demo` action ([2ce8826](2ce8826)), closes [#16](#16)
* **app:** add shortcut for search field ([fb3fecc](fb3fecc))
* **app:** display protected keyword ([56b8f4c](56b8f4c)), closes [#13](#13)
* **app:** entities in the api list are sorted by type and name ([c2ae928](c2ae928))
* **app:** filter by entity name on the api list page is focused by default ([865d0a4](865d0a4))
* **app:** replace `ngDoc` configuration field in `angular.json` with `ng-doc.config.js` file ([e2c9b6c](e2c9b6c)), closes [#20](#20)
* **ng-doc:** add links on each page to edit guides or API documentation ([9bc230a](9bc230a)), closes [#3](#3)
* **project:** add playground feature ([f750580](f750580)), closes [#12](#12)
* **project:** public release ([8a01852](8a01852))
* **ui-kit:** add `NgDocHotkeyDirective` for binding shortcuts ([e931994](e931994))
* **ui-kit:** add `NgDocScrollService` that allows to block document scroll ([e644459](e644459))
* **ui-kit:** add more types of button ([7708737](7708737))

### Performance Improvements

* **app:** add minification for HTML files ([c51ad6d](c51ad6d))
* **app:** remove unused languages imports for highlight.js ([ab93672](ab93672))
* **builder:** change imports from `@ng-doc/core` ([44b949c](44b949c))
* **builder:** reduce delays ([12a8fcf](12a8fcf))
* **builder:** replace `prettier` with `js-beautify` to reduce bundle size ([da688e5](da688e5))
@github-actions
Copy link

🎉 This issue has been resolved in version 15.0.0-beta.34 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants