Skip to content

feat: wi-76 make UI demo optional#747

Merged
wesleyboar merged 6 commits intomainfrom
feat/WI-76-make-ui-demo-optional
Nov 17, 2023
Merged

feat: wi-76 make UI demo optional#747
wesleyboar merged 6 commits intomainfrom
feat/WI-76-make-ui-demo-optional

Conversation

@wesleyboar
Copy link
Copy Markdown
Member

@wesleyboar wesleyboar commented Nov 16, 2023

Overview

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

Related

Changes

  • added NEEDS_DEMO variable to Makefile and passed it to Docker build command
  • changed Dockerfile to run different commands depending on value of NEEDS_DEMO

Testing

1. Core-CMS

  1. Build with no UI demo.
    build_ui_demo OFF

  2. Verify UI demo does not build.

    Details

    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
    �[2K�[1A�[2K�[G⚑ Exported 2 of 552 items
    ...
    
  3. Build with a UI demo.
    build_ui_demo ON

  4. Verify UI demo does build.

    Details

    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
    �[2K�[1A�[2K�[G⚑ 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

@wesleyboar wesleyboar marked this pull request as ready for review November 17, 2023 00:20
Copy link
Copy Markdown
Contributor

@jarosenb jarosenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@taoteg taoteg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@wesleyboar wesleyboar merged commit fc61ede into main Nov 17, 2023
@wesleyboar wesleyboar deleted the feat/WI-76-make-ui-demo-optional branch November 17, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants