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

feat: wi-76 make UI demo optional #747

Merged
merged 6 commits into from
Nov 17, 2023
Merged

Conversation

wesleyboar
Copy link
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.

    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.

    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
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
Collaborator

@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