Skip to content

Commit

Permalink
test-deploy with hardcoded deployed path
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitnarechania committed Sep 28, 2024
1 parent cc002d3 commit cd11f1a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ A Showcase of Applications Developed using ProvenanceWidgets.
- GitHub Actions is setup via the `.github/workflows/build.yaml` file. Built files are pushed to `gh-pages` branch and served via GitHub Pages at [https://provenancewidgets.github.io/showcase](https://provenancewidgets.github.io/showcase).

## Development vs. Building Configurations for base-href
- Development: Because the app served from `/` while developing locally, index.html must be configured with `<base href="/" />`.
- Build: Because the app is eventually served from `/showcase` (and not `/`), index.html must be configured with `<base href="/showcase/" />`. In addition, we pass `--base-href /showcase/` in the `ng build` command (already configured to do this as part of `npm run build`, see package.json).
- Development: Because the app served from `/` while developing locally, index.html must be configured with `<base href="/" />` and `src/app/applications/home/component.ts` must have the `url` set to `${window.location.origin}/#/${route};`.
- Build: Because the app is eventually served from `/showcase` (and not `/`), index.html must be configured with `<base href="/showcase/" />` and `src/app/applications/home/component.ts` must have the `url` set to `${window.location.origin}/showcase/#/${route};`. In addition, we pass `--base-href /showcase/` in the `ng build` command (already configured to do this as part of `npm run build`, see package.json).
16 changes: 8 additions & 8 deletions src/app/applications/home/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h4>Showcase</h4>
</div>
<div class="row">
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/playground')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('playground')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Playground</h5>
</ng-template>
Expand All @@ -34,7 +34,7 @@ <h5 class="text-center">Playground</h5>
</ng-template>
</p-card>
</div>
<div class="col-md-3" (click)="navigateToRoute('/scented-widgets')">
<div class="col-md-3" (click)="navigateToRoute('scented-widgets')">
<p-card class="w-100 cursor-pointer">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Scented Widgets</h5>
Expand All @@ -45,7 +45,7 @@ <h5 class="text-center">Scented Widgets</h5>
</p-card>
</div>
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/phosphor-objects')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('phosphor-objects')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Phosphor Objects</h5>
</ng-template>
Expand All @@ -55,7 +55,7 @@ <h5 class="text-center">Phosphor Objects</h5>
</p-card>
</div>
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/data-distribution')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('data-distribution')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Data Distribution</h5>
</ng-template>
Expand All @@ -68,7 +68,7 @@ <h5 class="text-center">Data Distribution</h5>
<br />
<div class="row">
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/vega-example')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('vega-example')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Vega Integration</h5>
</ng-template>
Expand All @@ -78,7 +78,7 @@ <h5 class="text-center">Vega Integration</h5>
</p-card>
</div>
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/dynamic-query-widgets-homefinder')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('dynamic-query-widgets-homefinder')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Dynamic Query Widgets</h5>
</ng-template>
Expand All @@ -88,7 +88,7 @@ <h5 class="text-center">Dynamic Query Widgets</h5>
</p-card>
</div>
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/widgets-to-vis-one-way')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('widgets-to-vis-one-way')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Widgets to Visualization one-way</h5>
</ng-template>
Expand All @@ -98,7 +98,7 @@ <h5 class="text-center">Widgets to Visualization one-way</h5>
</p-card>
</div>
<div class="col-md-3">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('/vis-to-widgets-one-way')">
<p-card class="w-100 cursor-pointer" (click)="navigateToRoute('vis-to-widgets-one-way')">
<ng-template pTemplate="subtitle">
<h5 class="text-center">Visualization to Widgets one-way</h5>
</ng-template>
Expand Down
3 changes: 1 addition & 2 deletions src/app/applications/home/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export class HomeComponent implements OnInit {
ngOnInit(): void { }

navigateToRoute(route:string){
const baseHref = this.location.normalize('/');
const url = `${window.location.origin}${baseHref}#${route}`;
const url = `${window.location.origin}/showcase/#/${route}`;
window.open(url, '_blank');
}
}

0 comments on commit cd11f1a

Please sign in to comment.