TACC / Core-CMS

The Core CMS codebase used by TACC Portals.
https://cep.tacc.utexas.edu
2 stars 1 forks source link

feat: wi-76 make UI demo optional #747

Closed wesleyboar closed 10 months ago

wesleyboar commented 10 months ago

Overview

Allow the UI demo to be optional in a full build.

Related

Changes

Testing

1. Core-CMS

  1. Build with no UI demo. build_ui_demo OFF
  2. Verify UI demo does not build.

    You should **not** see this: ``` > @tacc/core-cms@4.1.0 build:ui-demo > cd taccsite_ui && fractal build + Included Core-CMS stylesheets /assets/core-styles.cms.css /../../static/site_cms/css/build/core-cms.css ✔ Build started... ⚑ Exported 1 of 552 items ⚑ Exported 2 of 552 items ... ```
  3. Build with a UI demo. build_ui_demo ON
  4. Verify UI demo does build.

    You should see this: ``` > @tacc/core-cms@4.1.0 build:ui-demo > cd taccsite_ui && fractal build + Included Core-CMS stylesheets /assets/core-styles.cms.css /../../static/site_cms/css/build/core-cms.css ✔ Build started... ⚑ Exported 1 of 552 items ⚑ Exported 2 of 552 items ... ```

2. Core-CMS-Custom or tup-ui

  1. Build CMS with a "no demo" image.
  2. Verify http://localhost:8000/static/ui/index.html loads 404.
  3. Build CMS with a "has demo" image.
  4. Verify http://localhost:8000/static/ui/index.html loads UI demo.

_Note: Were you to build again, with build_ui_demo unchecked, a demo would not be built, but would still exist in the image, because Docker would use cached layer, because no files were changed._

UI

w/ Demo no Demo
before after no demo