From 6c80f5e7bf452e24d1e5c4928903a47d9d3073a1 Mon Sep 17 00:00:00 2001 From: mmeigs Date: Wed, 31 Jan 2024 14:44:31 -0500 Subject: [PATCH 1/2] Clean Chatbot of unnecessary component & style (#998) --- src/components/Widgets/ChatbotWidget/ChatbotFab.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/components/Widgets/ChatbotWidget/ChatbotFab.js b/src/components/Widgets/ChatbotWidget/ChatbotFab.js index a4bc20a85..16916e14a 100644 --- a/src/components/Widgets/ChatbotWidget/ChatbotFab.js +++ b/src/components/Widgets/ChatbotWidget/ChatbotFab.js @@ -3,19 +3,12 @@ import styled from '@emotion/styled'; import { useSiteMetadata } from '../../../hooks/use-site-metadata'; const Chatbot = lazy(() => import('mongodb-chatbot-ui')); - -const InputBarTrigger = lazy(() => - import('mongodb-chatbot-ui').then((module) => ({ default: module.InputBarTrigger })) -); const FloatingActionButtonTrigger = lazy(() => import('mongodb-chatbot-ui').then((module) => ({ default: module.FloatingActionButtonTrigger })) ); const ModalView = lazy(() => import('mongodb-chatbot-ui').then((module) => ({ default: module.ModalView }))); const StyledChatBotFabContainer = styled.div` - > div { - display: none; - } > button { border-width: 1px; position: unset; @@ -42,7 +35,6 @@ const ChatbotFab = () => { className={fabChatbot} > - Date: Wed, 31 Jan 2024 16:17:31 -0500 Subject: [PATCH 2/2] DOP-3949: Rename the "master" branch to "main" (#990) --- .github/workflows/test.yml | 4 ++-- README.md | 10 +++++----- package.json | 6 +++--- scripts/{ensure-master.js => ensure-main.js} | 2 +- src/constants.js | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) rename scripts/{ensure-master.js => ensure-main.js} (84%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72cab8fe3..a82df8f33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,10 @@ name: CI on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: test: diff --git a/README.md b/README.md index 44fd84105..d18d9bbbf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Uses [Gatsby](https://www.gatsbyjs.org/) to build static site. ## Installation -Snooty uses [artifactory](https://jfrog.com/artifactory/) that [will need authentication](https://github.com/mongodb/snooty/blob/master/.npmrc) to install some private npm packages. Update your local zsh variables in `$~/.zshrc` (in Windows `%USERPROFILE%/.zshrc`) to include the following +Snooty uses [artifactory](https://jfrog.com/artifactory/) that [will need authentication](https://github.com/mongodb/snooty/blob/main/.npmrc) to install some private npm packages. Update your local zsh variables in `$~/.zshrc` (in Windows `%USERPROFILE%/.zshrc`) to include the following ``` export NPM_BASE_64_AUTH= @@ -32,7 +32,7 @@ GATSBY_PARSER_BRANCH= GATSBY_SNOOTY_DEV=true ``` -The `GATSBY_SNOOTY_DEV` variable is what allows Gatsby to know that it should use the snooty branch name as part of the file paths. When not set, the file paths will use the value of `GATSBY_PARSER_BRANCH`. See pathing [here](https://github.com/mongodb/snooty/blob/master/src/utils/generate-path-prefix.js#L22) +The `GATSBY_SNOOTY_DEV` variable is what allows Gatsby to know that it should use the snooty branch name as part of the file paths. When not set, the file paths will use the value of `GATSBY_PARSER_BRANCH`. See pathing [here](https://github.com/mongodb/snooty/blob/main/src/utils/generate-path-prefix.js#L22) It should be set to `true` when working on snooty locally. @@ -54,7 +54,7 @@ npm run develop ``` To build and serve the site, run the following commands: -The serve command generates the site at a [prefix](https://github.com/mongodb/snooty/blob/master/src/utils/generate-path-prefix.js) ie. `localhost:9000/////` +The serve command generates the site at a [prefix](https://github.com/mongodb/snooty/blob/main/src/utils/generate-path-prefix.js) ie. `localhost:9000/////` ```shell $ npm run build @@ -120,9 +120,9 @@ If your changes specifically affect Gatsby Cloud preview builds, set up and use We have configured an automatic release process using [GitHub Actions](https://github.com/features/actions) that is triggered by [npm-version](https://docs.npmjs.com/cli/version). To release a version, you must have admin privileges in this repo. Then proceed as follows: -1. On the `master` branch, run `git pull` followed by `npm ci`. +1. On the `main` branch, run `git pull` followed by `npm ci`. 2. Run `npm version [major | minor | patch]`, using [Semantic Versioning](https://semver.org) guidelines to correctly increment the version number. Keep the minor version consistent with [snooty-parser versioning](https://github.com/mongodb/snooty-parser/tags). GitHub Actions will create a new git tag and push it to GitHub. -3. Update the release draft found [here](https://github.com/mongodb/snooty/releases) using the automatically generated [CHANGELOG.md](https://github.com/mongodb/snooty/blob/master/CHANGELOG.md) and publish the release. Keep "pre-release" checked until version 1.0.0. +3. Update the release draft found [here](https://github.com/mongodb/snooty/releases) using the automatically generated [CHANGELOG.md](https://github.com/mongodb/snooty/blob/main/CHANGELOG.md) and publish the release. Keep "pre-release" checked until version 1.0.0. :warning: This process cannot be completed if the releaser's `origin` points to a fork. diff --git a/package.json b/package.json index 5a8cdf47b..72e9f8393 100644 --- a/package.json +++ b/package.json @@ -39,16 +39,16 @@ "clean": "gatsby clean", "develop": "gatsby develop", "develop:preview": "GATSBY_IS_PREVIEW=true gatsby develop", - "ensure-master": "node scripts/ensure-master.js", + "ensure-main": "node scripts/ensure-main.js", "format": "npm run prettier -- --check", "format:fix": "npm run prettier -- --write", "lint": "eslint --ext .js,.jsx .", "lint:fix": "npm run lint -- --fix --max-warnings 0", "percy": "npm run build:clean && npm exec -- percy snapshot ./public -c .percy.yml", "prepare": "node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky install", - "postversion": "git push origin v$npm_package_version && git push origin master", + "postversion": "git push origin v$npm_package_version && git push origin main", "prettier": "prettier '**/*.{js,jsx,json,md}'", - "preversion": "npm run ensure-master && npm run format && npm run lint && npm run test", + "preversion": "npm run ensure-main && npm run format && npm run lint && npm run test", "serve": "gatsby serve --prefix-paths", "test": "jest", "test:unit": "jest unit", diff --git a/scripts/ensure-master.js b/scripts/ensure-main.js similarity index 84% rename from scripts/ensure-master.js rename to scripts/ensure-main.js index 8a71baea5..f43610e68 100644 --- a/scripts/ensure-master.js +++ b/scripts/ensure-main.js @@ -6,7 +6,7 @@ const getGitBranch = () => { .replace(/[\n\r\s]+$/, ''); }; -const ensureMaster = () => getGitBranch() === 'master'; +const ensureMaster = () => ['main', 'master'].includes(getGitBranch()); const main = () => { let warned = false; diff --git a/src/constants.js b/src/constants.js index eb0a51773..90ddb2e55 100644 --- a/src/constants.js +++ b/src/constants.js @@ -15,7 +15,7 @@ export const REF_TARGETS = { export const MARIAN_URL = process.env.GATSBY_MARIAN_URL || 'https://docs-search-transport.mongodb.com/'; // Class names to be used by mut for search indexing -// https://github.com/mongodb/mut/blob/master/mut/index/Document.py#L68 +// https://github.com/mongodb/mut/blob/main/mut/index/Document.py#L68 export const MUT_CANDIDATES = { mainColumn: 'main-column', };