Skip to content

Commit

Permalink
chore(demo): DocDemo generates invalid urls during attempts to patc…
Browse files Browse the repository at this point in the history
…h query params
  • Loading branch information
nsbarsukov committed Aug 12, 2024
1 parent ef7e6f1 commit 5508076
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/snapshots.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: 🚀 Snapshots
on:
pull_request: # debug only, revert before merge
push:
branches: [main, 'v[0-9]+.x', 'release/**']
workflow_dispatch:
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}

snapshots-of-release:
if: ${{ contains(github.head_ref || github.ref_name, 'release/') || github.event.inputs.updateMain == 'true' }}
# debug only, revert before merge
name: production
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 5 additions & 4 deletions projects/demo/src/modules/app/app.providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
tuiSortPages,
} from '@taiga-ui/addon-doc';
import {
TUI_BASE_HREF,
TUI_DIALOG_CLOSES_ON_BACK,
TUI_IS_E2E,
TUI_IS_PLAYWRIGHT,
Expand Down Expand Up @@ -171,9 +170,11 @@ export const APP_PROVIDERS: Provider[] = [
},
{
provide: TUI_DOC_URL_STATE_HANDLER,
deps: [TUI_BASE_HREF],
useFactory: (baseHref: string) => (tree: UrlTree) =>
String(tree).replace(baseHref, ''),
useFactory: (baseHref: string) => (tree: UrlTree) => {
console.info('=[TUI_DOC_URL_STATE_HANDLER]= ', {baseHref, tree});

return String(tree).replace(/^\/(next|v[0-9]+)\//, '');
},
},
{
provide: TUI_DOC_TYPE_REFERENCE_HANDLER,
Expand Down

0 comments on commit 5508076

Please sign in to comment.