Skip to content

Commit

Permalink
Merge branch 'palantir:develop' into bvandercar/fix-overlay-autoFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
bvandercar-vt authored Jan 27, 2025
2 parents 0415884 + 5d092cd commit acbe513
Show file tree
Hide file tree
Showing 556 changed files with 9,218 additions and 6,212 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
- store_test_results: { path: ./reports }
- store_artifacts: { path: ./reports }

test-react-16: &test-react
test-react-18: &test-react
docker: *docker-node-browsers-image
resource_class: xlarge
environment:
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
- store_test_results: { path: ./reports }
- store_artifacts: { path: ./reports }

test-iso-react-16: &test-iso
test-iso-react-18: &test-iso
docker: *docker-node-image
environment:
JUNIT_REPORT_PATH: reports
Expand Down Expand Up @@ -228,14 +228,14 @@ workflows:
requires: [compile]
- test-node-libs:
requires: [compile]
- test-react-16:
- test-react-18:
requires: [compile]
- test-iso-react-16:
- test-iso-react-18:
requires: [compile]
- deploy-preview:
requires: [dist]
- deploy-npm:
requires: [dist, lint, test-node-libs, test-react-16, test-iso-react-16]
requires: [dist, lint, test-node-libs, test-react-18, test-iso-react-18]
filters:
branches:
only:
Expand Down
6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ const rules = {
};

if (process.env.LINT_SCRIPT) {
// in CI, we don't wan to run eslint-plugin-prettier because it has a ~50% performance penalty.
// instead, run yarn format-check at the root to ensure prettier formatting.
// also, run import/no-cycle only in CI because it is slow.
// Run import/no-cycle only in CI because it is slow.
rules["import/no-cycle"] = "error";
} else {
xtends.push("plugin:prettier/recommended");
}

module.exports = {
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ about: Something not working as expected?

#### Environment

- __Package version(s)__: <!-- fill this out -->
- __Operating System__: <!-- fill this out -->
- __Browser name and version__: <!-- fill this out -->
- **Package version(s)**: <!-- fill this out -->
- **Operating System**: <!-- fill this out -->
- **Browser name and version**: <!-- fill this out -->

#### Code Sandbox

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ about: Propose a new feature or suggest an idea

#### Environment

- __Package version(s)__: <!-- fill this out -->
- __Browser and OS versions__: <!-- fill this out -->
- **Package version(s)**: <!-- fill this out -->
- **Browser and OS versions**: <!-- fill this out -->

#### Feature request

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/Support_question.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ about: Need help with Blueprint?

#### Environment

- __Package version(s)__: <!-- fill this out -->
- __Browser and OS versions__: <!-- fill this out -->
- **Package version(s)**: <!-- fill this out -->
- **Browser and OS versions**: <!-- fill this out -->

#### Question

Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#### Checklist

- [ ] Includes tests
- [ ] Update documentation
- [ ] Includes tests
- [ ] Update documentation

<!-- DO NOT enable CircleCI for your fork. Our build will run when you open this PR. -->

Expand Down
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ generated/
lib/
dist/
/site/
*.scss
*.less
yarn.lock
changelog/
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
"options": {
"tabWidth": 2
}
},
{
"files": ["*.scss"],
"options": {
"tabWidth": 2,
"printWidth": 100
}
}
]
}
7 changes: 0 additions & 7 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
"@blueprintjs/no-color-literal": [true, { "disableFix": true }],
"color-function-notation": "legacy",
"declaration-empty-line-before": null,
"indentation": [2, {
"ignore": ["value"]
}],
"max-line-length": [
100,
{ "ignore": ["comments"] }
],
"no-invalid-position-at-import-rule": [true, {
"ignoreAtRules": ["use"]
}],
Expand Down
4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// for consistent editor settings:
"EditorConfig.EditorConfig",
// for TS and JS:
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
// for formatting:
"esbenp.prettier-vscode"
]
}
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"[scss]": {
"editor.tabSize": 2
"[typescript][typescriptreact][javascript][json][scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"eslint.format.enable": false,
"eslint.workingDirectories": [
Expand Down
31 changes: 31 additions & 0 deletions .yarn/patches/react-day-picker-npm-7.4.9-8853eff118.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/types/Props.d.ts b/types/Props.d.ts
index f8fcd45ab3048d9b34709eba1797597ac2facdec..3afa05a42f485ff23899f20df2ff9d85bf588eed 100644
--- a/types/Props.d.ts
+++ b/types/Props.d.ts
@@ -44,7 +44,7 @@ export interface DayPickerProps {
captionElement?:
| React.ReactElement<Partial<CaptionElementProps>>
| React.ComponentClass<CaptionElementProps>
- | React.SFC<CaptionElementProps>;
+ | React.FC<CaptionElementProps>;
className?: string;
classNames?: ClassNames;
containerProps?: React.DetailedHTMLProps<
@@ -69,7 +69,7 @@ export interface DayPickerProps {
navbarElement?:
| React.ReactElement<Partial<NavbarElementProps>>
| React.ComponentClass<NavbarElementProps>
- | React.SFC<NavbarElementProps>;
+ | React.FC<NavbarElementProps>;
numberOfMonths?: number;
onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void;
onCaptionClick?: (month: Date, e: React.MouseEvent<HTMLDivElement>) => void;
@@ -142,7 +142,7 @@ export interface DayPickerProps {
weekdayElement?:
| React.ReactElement<Partial<WeekdayElementProps>>
| React.ComponentClass<WeekdayElementProps>
- | React.SFC<WeekdayElementProps>;
+ | React.FC<WeekdayElementProps>;
weekdaysLong?: string[];
weekdaysShort?: string[];
tabIndex?: number;
9 changes: 4 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Changelog
---------
# Changelog

Changelogs for `@blueprintjs/*` packages currently live in the project's Github wiki:

- [5.x Changelog](https://github.com/palantir/blueprint/wiki/5.x-Changelog)
- [4.x Changelog](https://github.com/palantir/blueprint/wiki/4.x-Changelog)
- [3.x Changelog](https://github.com/palantir/blueprint/wiki/3.x-Changelog)
- [5.x Changelog](https://github.com/palantir/blueprint/wiki/5.x-Changelog)
- [4.x Changelog](https://github.com/palantir/blueprint/wiki/4.x-Changelog)
- [3.x Changelog](https://github.com/palantir/blueprint/wiki/3.x-Changelog)
31 changes: 10 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,24 @@ A typical contributor workflow looks like this:

1. Create a new feature branch. We like to use a format like `[your-initials]/[short-name]`:
for example, `bd/refactor-buttons`.
1. Run development build tasks - follow the ["Developing libraries" steps in the README](https://github.com/palantir/blueprint/blob/develop/README.md#developing-libraries).
1. Visit http://localhost:9000 in your web browser to see the interactive docs web app.
2. Run development build tasks - follow the ["Developing libraries" steps in the README](https://github.com/palantir/blueprint/blob/develop/README.md#developing-libraries).
3. Visit http://localhost:9000 in your web browser to see the interactive docs web app.
4. Write some code. :hammer: **Refer to the wiki in this repo for detailed instructions on:**
- [Development practices](https://github.com/palantir/blueprint/wiki/Development-practices)
- [Coding guidelines](https://github.com/palantir/blueprint/wiki/Coding-guidelines)
- [Editor integration](https://github.com/palantir/blueprint/wiki/Editor-integration)
5. Ensure your code **compiles properly** and is **tested**, **linted**, and **formatted**.
- Run `yarn compile` at the repo root to build all libraries.
- Run `yarn bundle` at the repo root to build the Blueprint documentation and other bundles.
- Add unit tests as necessary when fixing bugs or adding features; run them with `yarn test`
in the relevant package directory.
- Linting is best handled by your editor for real-time feedback (see
[Editor integration](https://github.com/palantir/blueprint/wiki/Editor-integration)). Run
`yarn lint` to be 100% safe.
- Add unit tests as necessary when fixing bugs or adding features; run them with `yarn test` in the relevant package directory.
- Linting is best handled by your editor for real-time feedback (see [Editor integration](https://github.com/palantir/blueprint/wiki/Editor-integration)). Run `yarn lint` to be 100% safe.
- TypeScript lint errors can often be automatically fixed by ESLint. Run lint fixes with `yarn lint-fix`.
- Code formatting is enforced using [Prettier](https://prettier.io/). These errors can be fixed in your editor
through ESLint (make sure you have set up the editor integrations linked above).
__Formatting checks will not run__ during the `yarn lint` package script.
Instead, when using the CLI or in a CI environment, you should run the `yarn format` script to fix all
formatting issues across the Blueprint monorepo.
1. Submit a Pull Request on GitHub and fill out the template.
- ⚠️ __DO NOT enable CircleCI for your fork of Blueprint.__ When you open a PR, your branch will be checked out
and built in palantir's CI pipeline automatically. There is no need to enable the CI build for your fork's
pipeline. If you do, this may cause problems in the CI build.
- If you have already opened a PR where CircleCI built the code in your own personal or organization pipeline,
you will likely have to disable the project from building at app.circleci.com/settings/project/github/\<your-username\>/website
and open a new PR.
1. Team members will review your code and merge it after approvals.
- Code formatting is enforced using [Prettier](https://prettier.io/). These errors can be fixed in your editor through the Prettier extension (make sure you have set up the editor integrations linked above). **Formatting checks will not run** during the `yarn lint` package script. Instead, when using the CLI or in a CI environment you should run the `yarn format` script to fix all formatting issues across the Blueprint monorepo.
6. Submit a Pull Request on GitHub and fill out the template.
- ⚠️ **DO NOT enable CircleCI for your fork of Blueprint.** When you open a PR, your branch will be checked out and built in palantir's CI pipeline automatically. There is no need to enable the CI build for your fork's pipeline. If you do, this may cause problems in the CI build.
- If you have already opened a PR where CircleCI built the code in your own personal or organization pipeline, you will likely have to disable the project from building at app.circleci.com/settings/project/github/\<your-username\>/website and open a new PR.
7. Team members will review your code and merge it after approvals.
- You may be asked to make modifications to code style or to fix bugs you may have not noticed.
- Please respond to comments in a timely fashion (even if to tell us you need more time).
- _Do not_ amend commits and `push --force` as they break the PR history. Please add more commits; we squash each PR to a single commit on merge.
1. Hooray, you contributed! :tophat:
8. Hooray, you contributed! :tophat:
40 changes: 13 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ First, ensure you have `nvm` ([Node Version Manager](https://github.com/nvm-sh/n
After cloning this repo, run:

1. `nvm use` to use the supported Node version for Blueprint development.
1. `corepack enable` to activate [Yarn](https://yarnpkg.com/getting-started) as the Node package manager.
1. `yarn` to install all dependencies for the monorepo.
1. If seeing an error like "Error when performing the request ...", you may be using a VPN that needs to be disabled to install the dependencies.
1. If running on Windows:
2. `corepack enable` to activate [Yarn](https://yarnpkg.com/getting-started) as the Node package manager.
3. `yarn` to install all dependencies for the monorepo.
1. If seeing an error like "Error when performing the request ...", you may be using a VPN that needs to be disabled to install the dependencies.
4. If running on Windows:
1. `npm install -g windows-build-tools` to install build tools globally
1. Ensure `bash` is your configured script-shell by running:<br />
2. Ensure `bash` is your configured script-shell by running:<br />
`npm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"`
1. `yarn verify` to ensure you have all the build tooling working properly.
1. There may currently be some errors when running this step, even though everything is set up properly, see https://github.com/palantir/blueprint/issues/6926 for more info.
5. `yarn verify` to ensure you have all the build tooling working properly.
1. There may currently be some errors when running this step, even though everything is set up properly, see https://github.com/palantir/blueprint/issues/6926 for more info.

### Incorporating upstream changes

Expand All @@ -101,47 +101,33 @@ If you were previously in a working state and have just pulled new code from `de
- If there were package dependency changes, run `yarn` at the root.
- This command is very quick if there are no new things to install.
- Run `yarn compile` to get the latest built versions of the library packages in this repo.
- This command is quicker than `yarn verify` since it doesn't build the application packages (`docs-app`,
`landing-app`, etc.) or run tests
- This command is quicker than `yarn verify` since it doesn't build the application packages (`docs-app`,`landing-app`, etc.) or run tests

### Developing libraries

There are a few ways to run development scripts, here they are listed from simplest to more advanced usage:

- Run `yarn dev` from the root directory to watch changes across all packages and run the docs application with
webpack-dev-server.
- Run `yarn dev` from the root directory to watch changes across all packages and run the docs application with webpack-dev-server.
- Alternately, most libraries have a dev script to run the docs app _and_ watch changes to only that package:
- `yarn dev:core`
- `yarn dev:docs`
- `yarn dev:datetime`
- `yarn dev:select`
- `yarn dev:table`
- Lastly, if you want to control exactly which dev scripts are run and view the console output in the cleanest way,
we recommend opening separate terminal windows or splits and running local package dev tasks in each one. This is
the recommended workflow for frequent contributors and advanced developers. For example, to test changes in the core
and icons packages, you would run the following in separate terminals:
- Lastly, if you want to control exactly which dev scripts are run and view the console output in the cleanest way, we recommend opening separate terminal windows or splits and running local package dev tasks in each one. This is the recommended workflow for frequent contributors and advanced developers. For example, to test changes in the core and icons packages, you would run the following in separate terminals:
- `cd packages/core && yarn dev`
- `cd packages/icons && yarn dev`
- `cd packages/docs-app && yarn dev`

### Updating documentation

Much of Blueprint's documentation lives inside source code as JSDoc comments in `.tsx` files and KSS markup in `.scss`
files. This documentation is extracted and converted into static JSON data using
[documentalist](https://github.com/palantir/documentalist/).

If you are updating documentation sources (_not_ the docs UI code which lives in `packages/docs-app` or the docs theme
in `packages/docs-theme`), you'll need to run `yarn compile` from `packages/docs-data` to see changes reflected in the
application. For simplicity, an alias script `yarn docs-data` exists in the root to minimize directory hopping.
Much of Blueprint's documentation lives inside source code as JSDoc comments in `.tsx` files and KSS markup in `.scss` files. This documentation is extracted and converted into static JSON data using [documentalist](https://github.com/palantir/documentalist/). If you are updating documentation sources (_not_ the docs UI code which lives in `packages/docs-app` or the docs theme in `packages/docs-theme`), you'll need to run `yarn compile` from `packages/docs-data` to see changes reflected in the application. For simplicity, an alias script `yarn docs-data` exists in the root to minimize directory hopping.

### Updating icons

The [One-time setup](#one-time-setup) and [Incorporating upstream changes](#incorporating-upstream-changes) steps should
produce the generated source code in this repo used to build the icons documentation. This is sufficient for most
development workflows.
The [One-time setup](#one-time-setup) and [Incorporating upstream changes](#incorporating-upstream-changes) steps should produce the generated source code in this repo used to build the icons documentation. This is sufficient for most development workflows.

If you are updating icons or adding new ones, you'll need to run `yarn compile` in `packages/icons` to see those changes
reflected before running any of the dev scripts.
If you are updating icons or adding new ones, you'll need to run `yarn compile` in `packages/icons` to see those changes reflected before running any of the dev scripts.

## License

Expand Down
22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"dev:table": "nx run-many -t dev -p @blueprintjs/table @blueprintjs/table-dev-app",
"dist": "nx run-many -t dist",
"docs-data": "nx compile @blueprintjs/docs-data",
"format": "prettier --write \"./**/*.{ts,tsx,json}\"",
"format-check": "prettier --check \"./**/*.{ts,tsx,json}\"",
"format": "prettier --write \"./**/*.{ts,tsx,json,yaml,yml,scss}\"",
"format-check": "prettier --check \"./**/*.{ts,tsx,json,yaml,yml,scss}\"",
"lint": "nx run-many -t lint",
"lint-fix": "nx run-many -t lint-fix",
"serve": "http-server site",
Expand All @@ -34,40 +34,38 @@
"verify": "npm-run-all -s compile dist -p test lint format-check"
},
"dependencies": {
"@lerna-lite/cli": "^3.2.1",
"@lerna-lite/version": "^3.2.1",
"@lerna-lite/cli": "^3.11.0",
"@lerna-lite/version": "^3.11.0",
"@types/chai": "~4.3.11",
"@types/enzyme": "~3.10.18",
"@types/enzyme-adapter-react-16": "~1.0.9",
"@types/mocha": "~10.0.6",
"@types/node": "~20.11.6",
"@types/react": "~16.14.55",
"@types/react-dom": "~16.9.24",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-transition-group": "~4.4.10",
"@types/sinon": "~17.0.3",
"@types/yargs": "~17.0.32",
"@yarnpkg/types": "^4.0.0",
"chai": "^5.0.0",
"dedent": "^1.5.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"gh-pages": "^6.1.1",
"http-server": "^14.1.1",
"npm-run-all": "^4.1.5",
"nx": "^17.2.8",
"octokit": "^3.1.2",
"prettier": "^3.2.4",
"sinon": "^17.0.1",
"stylelint": "~14.16.1",
"stylelint-config-palantir": "^6.0.1",
"stylelint-scss": "^5.3.2",
"stylelint": "~16.11.0",
"stylelint-config-palantir": "^7.4.0",
"stylelint-scss": "^6.8.1",
"typescript": "~5.3.3",
"yargs": "^17.7.2",
"yarn-deduplicate": "^6.0.2"
},
"resolutions": {
"@types/react": "16.14.55"
"@types/react": "18.3.12"
},
"engines": {
"node": ">=20.11"
Expand Down
2 changes: 1 addition & 1 deletion packages/colors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blueprintjs/colors",
"version": "5.1.2",
"version": "5.1.5",
"description": "Blueprint color definitions",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
Expand Down
Loading

0 comments on commit acbe513

Please sign in to comment.