From bfab68f629f5ce116f8e1a5de25d22f9bb9238e1 Mon Sep 17 00:00:00 2001 From: Julian Skinner Date: Tue, 27 Feb 2024 09:54:20 -0600 Subject: [PATCH 1/3] chore: remove heroku artifacts (#1865) * chore: remove heroku artifacts * chore: remove additional heroku files --------- Co-authored-by: Julian Skinner --- README.md | 16 ------------- app.json | 12 ---------- bin/compile | 29 ---------------------- bin/detect | 7 ------ bin/release | 5 ---- docs/catalog-info.yaml | 2 +- package.json | 3 --- packages/sage-react/package.json | 1 - readme/CICD.md | 41 ++++---------------------------- 9 files changed, 5 insertions(+), 111 deletions(-) delete mode 100644 app.json delete mode 100755 bin/compile delete mode 100755 bin/detect delete mode 100755 bin/release diff --git a/README.md b/README.md index b4b857a4e5..659655eca3 100644 --- a/README.md +++ b/README.md @@ -117,10 +117,6 @@ When running the `bridge`, you *must* have `yarn start` running in this reposito Within your Kajabi Products repository, run the project as you usually would and in tandem also run Kajabi-Products' `webpack-dev-server`. For Kajabi Products to watch changes within your local Sage repo `webpack-dev-server` needs to be running. -```bash -$ heroku local -``` - ```bash $ bin/webpack-dev-server ``` @@ -184,10 +180,6 @@ Start the documentation site from the `docs/` folder. Will be located at http:// Run `bundle install` on the `docs/` folder. -### `docs:deploy` - -This command is to deploy the Documentation Site application to Heroku. This is an automated process through Continuous Deployment. - ### `docs:initialize` Initialize the docs site. Install all gems/packages @@ -216,10 +208,6 @@ Establish a local link between the Sage Rails gem and the internal Sage Packages Run the SassDoc server from the `@kajabi/sage-assets` package. -### `sassdocs:deploy` - -This command is for deploying the SassDocs application to Heroku. This is an automated process through Continuous Deployment. - ### `setup` :star: Run the initial setup scripts @@ -240,10 +228,6 @@ Continually compiles packages on changes and starts the applications. Launch "storybook" from the `@kajabi/sage-react` package -### `storybook:deploy` - -This command is for deploying the Storybook application to Heroku. This is an automated process through Continuous Integration. - ### `test` Run all `test:*` scripts diff --git a/app.json b/app.json deleted file mode 100644 index b8272a5d92..0000000000 --- a/app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Sage Design System Documentation Site", - "description": "Documentation Site for the Sage Design System", - "website": "http://kajabi.com", - "buildpacks": [ - { "url": "https://github.com/heroku/heroku-buildpack-inline.git" }, - { "url": "https://github.com/debitoor/heroku-buildpack-npmrc.git" }, - { "url": "heroku/ruby" }, - { "url": "heroku/nodejs" } - ], - "scripts": {} -} diff --git a/bin/compile b/bin/compile deleted file mode 100755 index 3776b22f7e..0000000000 --- a/bin/compile +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# bin/compile - -# used for inline heroku buildpack - -BUILD_DIR=${1:-} -CACHE_DIR=${2:-} -ENV_DIR=${3:-} - -PROJECT_PATH=docs - -echo "-----> My Subdir buildpack: path is $PROJECT_PATH" -echo " creating cache: $CACHE_DIR" -mkdir -p $CACHE_DIR -TMP_DIR=`mktemp -d $CACHE_DIR/subdirXXXXX` -echo " created tmp dir: $TMP_DIR" - -echo " moving working dir: $PROJECT_PATH to $TMP_DIR" -cp -R $BUILD_DIR/$PROJECT_PATH/. $TMP_DIR/ - -echo " cleaning build dir $BUILD_DIR" -rm -rf $BUILD_DIR -echo " recreating $BUILD_DIR" -mkdir -p $BUILD_DIR -echo " copying work dir from cache $TMP_DIR to build dir $BUILD_DIR" -cp -R $TMP_DIR/. $BUILD_DIR/ -echo " cleaning tmp dir $TMP_DIR" -rm -rf $TMP_DIR -exit 0 diff --git a/bin/detect b/bin/detect deleted file mode 100755 index 2987d548bf..0000000000 --- a/bin/detect +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# bin/detect - -# used for inline heroku buildpack - -echo "My Subdir buildpack" -exit 0 diff --git a/bin/release b/bin/release deleted file mode 100755 index 47640eff6a..0000000000 --- a/bin/release +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -# used for inline heroku buildpack - -echo "--- {}" diff --git a/docs/catalog-info.yaml b/docs/catalog-info.yaml index 0afd67045c..39813d7e72 100644 --- a/docs/catalog-info.yaml +++ b/docs/catalog-info.yaml @@ -9,7 +9,7 @@ metadata: - javascript - documentation links: - - url: https://sage-lib-documentation.herokuapp.com/pages/index + - url: https://sage-lib-documentation.production.kajabi.farm/pages/index title: Public Documentation Site icon: dashboard spec: diff --git a/package.json b/package.json index b1ba957c64..c89f50eaa5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "commit": "yarn cz", "docs": "cd docs && yarn start", "docs:bundle": "bin/bundle.sh", - "docs:deploy": "git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_DOCS_APP_NAME.git `git subtree split --prefix docs main`:master --force", "docs:initialize": "yarn docs:bundle && cd docs && yarn install", "external": "bin/local-link-frontend.sh false", "gem:bump:type": "export SAGE_ORIGINAL_VER=$(bin/gem-version.sh); node bin/js/gem-bump-type.js", @@ -55,12 +54,10 @@ "lint:react": "cd packages/sage-react && yarn lint", "local": "bin/local-link-frontend.sh true", "sassdocs": "cd packages/sage-assets && yarn run start", - "sassdocs:deploy": "git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_SASSDOCS_APP_NAME.git `git subtree split --prefix packages/sage-assets main`:master --force", "setup": "bin/setup.sh", "setup:init": "yarn install && yarn docs:initialize", "start": "yarn npm-run-all --parallel build:sd watch docs storybook sassdocs", "storybook": "cd packages/sage-react && yarn storybook", - "storybook:deploy": "git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_STORYBOOK_APP_NAME.git `git subtree split --prefix packages/sage-react main`:master --force", "test": "yarn npm-run-all test:prod:*", "test:dev": "yarn npm-run-all test:dev:*", "test:dev:react": "cd packages/sage-react && yarn test:dev", diff --git a/packages/sage-react/package.json b/packages/sage-react/package.json index 8267170910..d7ca6d18ad 100644 --- a/packages/sage-react/package.json +++ b/packages/sage-react/package.json @@ -35,7 +35,6 @@ "scripts": { "build": "build-storybook -o build && webpack --config webpack/webpack.prod.js", "build:watch": "build-storybook -o build && webpack --config webpack/webpack.prod.js --watch", - "heroku-prebuild": "npm install react@16.13.1 react-dom@16.13.1 react-router-dom@5.1.0 --no-package-lock", "lint": "yarn run eslint \"lib/**/*.{js,jsx}\"", "storybook": "start-storybook -p 4100 --ci", "preversion": "yarn install && yarn run build", diff --git a/readme/CICD.md b/readme/CICD.md index 94a45e84b7..184a88d1ea 100644 --- a/readme/CICD.md +++ b/readme/CICD.md @@ -1,6 +1,6 @@ # Continuous Integration, Deployment, Versioning, and Releases -Continuous Integration is being handled by GitHub Actions with deployments going to Heroku. Lerna is integrated into the Pipeline to allow for automatic Versioning, Changelogs, and Releases. +Continuous Integration is being handled by GitHub Actions with deployments going to EKS. Lerna is integrated into the Pipeline to allow for automatic Versioning, Changelogs, and Releases. ## Jobs @@ -8,10 +8,6 @@ Continuous Integration is being handled by GitHub Actions with deployments going The `lint-build-test` job is reponsible for verifying the integrity of the suite. It ensures all linting, testing, and build procedures pass before allowing a merge. This job is run as part of every PR and push to `main`. -*NOTE: Do not ever push to `main` directly* - -[Review Apps](https://devcenter.heroku.com/articles/github-integration-review-apps) have been integrated on every PR. They will only show the main Rails Documentation Site. - ### release-and-deploy The `release-and-deploy` step only triggers on `main` pushes that are not initiated by the CI system. This includes merges into `main` from a PR. @@ -30,41 +26,12 @@ There are 3 applications as part of the Sage suite. Each of these elements have ### Rails "Docs" Site -Deployed to: https://sage-lib-documentation.herokuapp.com/ - -The `docs:deploy` script at the root of the monorepo is designed to push a subtree of the `docs/` folder to the Heroku master. - -#### Heroku Env Requirements - -> Note: Must be a valid GitHub PAT - -```text -//npm.pkg.github.com/:_authToken= - @kajabi:registry=https://npm.pkg.github.com/ -``` - -#### Heroku Buildpack Requirements - -- https://github.com/debitoor/heroku-buildpack-npmrc.git -- heroku/ruby -- heroku/nodejs +Deployed to: https://sage-lib-documentation.production.kajabi.farm/ ### React Storybook Site -Deployed to: https://sage-lib-storybook.herokuapp.com/ - -The `storybook:deploy` script at the root of the monorepo is designed to push a subtree of the `packages/sage-react` folder to the Heroku master. - -#### Heroku Buildpack Requirements - -- heroku/nodejs +Deployed to: https://sage-lib-storybook.production.kajabi.farm/ ### SASSDocs Site -Deployed to: https://sage-lib-sassdocs.herokuapp.com/ - -The `sassdoc:deploy` script at the root of the monorepo is designed to push a subtree of the `packages/sage-assets` folder to the Heroku master. - -#### Heroku Buildpack Requirements - -- heroku/nodejs +Deployed to: https://sage-lib-sassdocs.production.kajabi.farm/ From 207ba5e1df3da58618df681d339374f354c1984b Mon Sep 17 00:00:00 2001 From: Ashley Echols Date: Tue, 5 Mar 2024 14:54:02 -0600 Subject: [PATCH 2/3] fix(hero): adds missing prop to allow custom class names --- packages/sage-react/lib/Hero/Hero.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/sage-react/lib/Hero/Hero.jsx b/packages/sage-react/lib/Hero/Hero.jsx index 7294eaaf87..15af97696e 100644 --- a/packages/sage-react/lib/Hero/Hero.jsx +++ b/packages/sage-react/lib/Hero/Hero.jsx @@ -9,6 +9,7 @@ export const Hero = ({ borderless, children, ctaAttributes, + className, customBackgroundColor, description, contained, @@ -20,8 +21,9 @@ export const Hero = ({ titleTag, ...rest }) => { - const className = classnames( + const classNames = classnames( 'sage-hero', + className, { [`sage-hero--${heroSize}`]: heroSize, 'sage-hero--borderless': borderless, @@ -41,7 +43,7 @@ export const Hero = ({ return (
@@ -85,6 +87,7 @@ Hero.defaultProps = { ctaAttributes: null, children: null, contained: false, + className: null, customBackgroundColor: null, description: null, footerActions: null, @@ -117,6 +120,10 @@ Hero.propTypes = { * If true, the image will not fill the space. */ contained: PropTypes.bool, + /** + * Allows a custom class name to apply to the component. + */ + className: PropTypes.string, /** * The background color to be applied to the Hero. */ From 18e83f63fb98eccf83c6811ec91f020b99596f02 Mon Sep 17 00:00:00 2001 From: Quinton Jason Date: Thu, 7 Mar 2024 13:07:34 -0600 Subject: [PATCH 3/3] fix(modal): move scrollbars to the edge of the container when scrollable * style(modal): use padding instead of margin to move scrollbars away from content * style(modal): update order of props * style(modal): remove overflow hidden --- packages/sage-assets/lib/stylesheets/components/_modal.scss | 4 ++-- packages/sage-react/lib/Modal/Modal.story.jsx | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/sage-assets/lib/stylesheets/components/_modal.scss b/packages/sage-assets/lib/stylesheets/components/_modal.scss index 251c675723..166a8e9304 100644 --- a/packages/sage-assets/lib/stylesheets/components/_modal.scss +++ b/packages/sage-assets/lib/stylesheets/components/_modal.scss @@ -268,8 +268,8 @@ $-modal-inner-size: sage-container(md); .sage-modal--scrollable & { @include overflow-scroll(y); - margin-top: 0; - padding: sage-spacing(xs) sage-spacing(3xs); + padding: sage-spacing(xs) sage-spacing(md) sage-spacing(md); + margin: 0; > :first-child { margin-top: sage-spacing(xs); diff --git a/packages/sage-react/lib/Modal/Modal.story.jsx b/packages/sage-react/lib/Modal/Modal.story.jsx index 11e03c30e9..f88e61540a 100644 --- a/packages/sage-react/lib/Modal/Modal.story.jsx +++ b/packages/sage-react/lib/Modal/Modal.story.jsx @@ -148,6 +148,7 @@ export default { 'Modal.FooterAside': Modal.FooterAside, }, args: { + allowScroll: false, animation: Modal.ANIMATION_PRESETS, }, argTypes: { @@ -264,6 +265,7 @@ export const ModalWithCustomSize = (args) => {