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

refactor!: migrate to Lumina #10482

Merged
merged 113 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
41f6334
refactor!: migrate to Lumina
jcfranco Nov 4, 2024
0a76313
updated pass
jcfranco Nov 5, 2024
334557a
bump TS + add @lit/react
jcfranco Nov 5, 2024
e834bbb
dedupe deps
jcfranco Nov 5, 2024
ccfd21a
move deps to root
jcfranco Nov 5, 2024
7f9a417
drop @stencil-community/eslint-plugin and remove rules
jcfranco Nov 5, 2024
4534f06
fix icons build
jcfranco Nov 5, 2024
e1656f3
sync all lumina deps
jcfranco Nov 5, 2024
5c44ccb
remove ignore lines for @stencil-community/eslint-plugin rules
jcfranco Nov 5, 2024
0805f61
make messages internal
jcfranco Nov 5, 2024
d5f19d1
drop unnecessary react-wrapper patch
jcfranco Oct 25, 2024
7ccd607
build(deps): cherry pick updates from dev (#10694)
benelan Nov 5, 2024
065951c
remove Stencil logic from custom ESLint rules
jcfranco Nov 5, 2024
0979376
refactor(table): refactor internals to work around HTML parser issue …
jcfranco Nov 4, 2024
b3ef2f7
fix scripts and update storybook to leverage vite build
jcfranco Nov 5, 2024
19d964a
merge dev
jcfranco Nov 5, 2024
54ba218
dedupe
jcfranco Nov 5, 2024
69f89b4
dedupe
jcfranco Nov 5, 2024
c80074a
merge dev
jcfranco Nov 5, 2024
d6dcb23
merge dev
jcfranco Nov 5, 2024
19893c1
build(deps): reinstall calcite-web
benelan Nov 5, 2024
f3fa8bf
fix: set default scale on action-related components
jcfranco Nov 6, 2024
8c895c4
fix date-picker-month-header rendering issues
jcfranco Nov 6, 2024
6b6186c
fix button rendering issues
jcfranco Nov 6, 2024
c90577d
fix booleans from carousel stories
jcfranco Nov 6, 2024
0e6bd5e
remove remaining files from deprecated custom ESLint rules
jcfranco Nov 6, 2024
1207156
fix button regression
jcfranco Nov 6, 2024
a3d3818
fix spec tests
jcfranco Nov 6, 2024
874208f
block handle messages for a11y label replacement
jcfranco Nov 6, 2024
d14c644
fix dom.spec.ts type error
jcfranco Nov 6, 2024
e02bfa7
fix slider rendering issue
jcfranco Nov 6, 2024
f620091
fix carousel stories
jcfranco Nov 6, 2024
882c52f
fix inline-editable default scale logic
jcfranco Nov 6, 2024
4fd549c
fix sort-handle initially open bug
jcfranco Nov 6, 2024
df753a9
fix slider fill-placements story
jcfranco Nov 6, 2024
26cc2b3
fix input-time-zone initialization
jcfranco Nov 6, 2024
b2efc20
guard against observing null refs
jcfranco Nov 6, 2024
11433dd
fix input-time-picker initially open bug
jcfranco Nov 6, 2024
785cf52
drop obsolete t9n util
jcfranco Nov 6, 2024
99a6eb4
tidy up
jcfranco Nov 6, 2024
264bb9a
fix sort handle event names in tests
jcfranco Nov 7, 2024
d1acdea
temporarily skip openClose tests
jcfranco Nov 7, 2024
867a3a1
fix text-area tests
jcfranco Nov 7, 2024
1c65897
skip E2E tests that rely on `nb` ➡️ `no` mapping
jcfranco Nov 7, 2024
2b07147
update formAssociated test
jcfranco Nov 7, 2024
107c62a
fix split-button test
jcfranco Nov 7, 2024
f2bbe74
fix action-related tests
jcfranco Nov 7, 2024
a6b2bf0
fix input-time-picker test
jcfranco Nov 7, 2024
af75e8d
fix select tests
jcfranco Nov 7, 2024
91c2bfa
fix handle test
jcfranco Nov 7, 2024
e95f8e6
fix inline-editable test
jcfranco Nov 7, 2024
58971b3
drop test on internal property
jcfranco Nov 7, 2024
a7888ce
fix stepper focusing test
jcfranco Nov 7, 2024
6b3d0b9
fix duplicate stepper test ID
jcfranco Nov 7, 2024
2020964
fix action-bar and action-pad tests
jcfranco Nov 7, 2024
5717918
drop obsolete Stencil Storybook config
jcfranco Nov 7, 2024
baf3af5
stabilize dialog tests
jcfranco Nov 7, 2024
5abf247
restore Norwegian testing filter in input tests
jcfranco Nov 7, 2024
df24a85
avoid clearing internal tab-nav node when disconnected
jcfranco Nov 7, 2024
c6b1c10
fix sort-handle error from nulled ref
jcfranco Nov 8, 2024
38121ac
fix date-picker-month-header error from nulled ref
jcfranco Nov 8, 2024
115b04f
fix radio-button-group tests
jcfranco Nov 8, 2024
b912bd8
fix select tests
jcfranco Nov 8, 2024
d6e274f
replace findLast until we can bump our lib
jcfranco Nov 8, 2024
482e303
fix input-time-zone tests
jcfranco Nov 12, 2024
f7e94ac
fix tile-select test
jcfranco Nov 12, 2024
1b9467a
stabilize tile-select test
jcfranco Nov 12, 2024
7e21380
stabilize dialog test
jcfranco Nov 12, 2024
b9059eb
bump Lumina to latest
jcfranco Nov 12, 2024
b098a59
configure useT9n to resolve Norwegian lang tag to "no"
jcfranco Nov 12, 2024
aa1efd5
stabilize select test
jcfranco Nov 13, 2024
7c6f275
tidy up global attribute watcher notes
jcfranco Nov 13, 2024
ff180cd
tidy up willUpdate migration notes
jcfranco Nov 13, 2024
405902b
tidy up required migration notes
jcfranco Nov 13, 2024
afbc7b9
tidy up env var migration notes
jcfranco Nov 13, 2024
8d634e6
fix openClose tests
jcfranco Nov 13, 2024
a2c87a7
fix tabs test
jcfranco Nov 13, 2024
3254742
add null ref guards in input-time-picker
jcfranco Nov 13, 2024
915f28b
restore pagination initialization logic
jcfranco Nov 13, 2024
d817ebd
fix tabs initial selection logic
jcfranco Nov 13, 2024
265a13a
guard against null dropdown ref in sort-handle
jcfranco Nov 13, 2024
174c906
fix render of initially active inline-editable
jcfranco Nov 13, 2024
1b1a8f9
enable Turbosnap
jcfranco Nov 13, 2024
5aa8d29
add --stats-json to storybook build (required for Turbosnap)
jcfranco Nov 13, 2024
91b8054
add internal var to check if asset path has been customized
jcfranco Nov 13, 2024
59fb9bf
stabilize dialog test
jcfranco Nov 13, 2024
5e8ae69
revisit inline-editable render fix
jcfranco Nov 13, 2024
de8ce51
bump Lumina to latest
jcfranco Nov 13, 2024
57fefcd
stabilize modal test
jcfranco Nov 13, 2024
04af92c
restore globalScript
jcfranco Nov 13, 2024
10bea7a
remove addressed migration notes
jcfranco Nov 13, 2024
17a4344
fix generateT9nDocsJSON script
jcfranco Nov 13, 2024
75087dd
restore build preamble
jcfranco Nov 13, 2024
7e82b5b
add legacy vscode-data.json to prevent breaking change
jcfranco Nov 14, 2024
97efa1e
drop stencil config
jcfranco Nov 14, 2024
602d56c
drop references to www and stencil dirs
jcfranco Nov 14, 2024
3f4291a
remove references to the obsolete src/components.d.ts
jcfranco Nov 14, 2024
dfca7da
update boilerplate component example
jcfranco Nov 14, 2024
32a3639
tidy up deploy-latest commit message
jcfranco Nov 14, 2024
5cd0f98
simplify translations json file name
jcfranco Nov 14, 2024
ad054fd
fix list tests
jcfranco Nov 14, 2024
458a105
fix config spec test
jcfranco Nov 14, 2024
aeec77e
show config details in dev mode
jcfranco Nov 14, 2024
a47986a
update VSCode launch config
jcfranco Nov 14, 2024
25ee4e3
simplify test:prerender script
jcfranco Nov 15, 2024
006b614
disable TurboSnap
jcfranco Nov 15, 2024
ffbdde6
fix action-menu toggle
jcfranco Nov 15, 2024
476c481
add missing prop
jcfranco Nov 15, 2024
f9aa5cf
tidy up pagination rendering
jcfranco Nov 15, 2024
8c6c618
tidy up vitest workspace
jcfranco Nov 15, 2024
d2e6d5d
add delay to combobox story
jcfranco Nov 15, 2024
1907b11
fix action-menu null ref error
jcfranco Nov 15, 2024
e1444e8
block action for a11y text
jcfranco Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/calcite-components/src/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { makeRuntime } from "@arcgis/lumina";
import globalScript from "./utils/globalScript";

globalScript();

export const runtime = makeRuntime();

Expand Down
13 changes: 12 additions & 1 deletion packages/calcite-components/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { execSync } from "child_process";
import tailwindcss, { Config as TailwindConfig } from "tailwindcss";
import autoprefixer from "autoprefixer";
import stylelint from "stylelint";
// TODO: [MIGRATION] review configuration documentation: https://qawebgis.esri.com/arcgis-components/?path=/docs/lumina-build--docs
// TODO: [MIGRATION] For an equivalent of Stencil's globalScript option, simply add the global code to src/runtime.ts file. Such code will execute before any component code
// TODO: [MIGRATION] Lumina will output everything into the dist/ directory. If any of your configs or scripts are mentioning www/ or .docs/ directories, you should update them
// TODO: [MIGRATION] the main /index.html file is now in the package root. Also, you do not need any script or link tags in index.html files - they are added automatically by the dev server. And, you can import type script files in index.html. Please copy the content of your /src/index.html into /index.html. Vite also allows multiple index.html files
// TODO: [MIGRATION] evaluate the usages of the key={} props - most of the time key is not necessary in Lit. See https://qawebgis.esri.com/arcgis-components/?path=/docs/lumina-jsx--docs#key-prop
// TODO: [MIGRATION] codemod begun configuring Lit react wrappers, but you will have to finish updating the package.json, readme and other files in the wrapper. see docs: https://qawebgis.esri.com/arcgis-components/?path=/docs/lumina-build--docs#buildwrappers
import { defineConfig } from "vite";
import { useLumina } from "@arcgis/lumina-compiler";
import replace from "@rollup/plugin-replace";
import { version } from "./package.json";
import tailwindConfig from "./tailwind.config";

export default defineConfig({
Expand Down Expand Up @@ -43,6 +45,15 @@ export default defineConfig({
},
},
}),
replace({
Copy link
Member Author

Choose a reason for hiding this comment

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

(optional) vite provides env variables support without a plugin, so if you don't need extra customization options you can use that to keep build config simpler and performance better: https://vite.dev/guide/env-and-mode

values: {
__CALCITE_BUILD_DATE__: () => new Date().toISOString().split("T")[0],
__CALCITE_REVISION__: execSync("git rev-parse --short HEAD", { encoding: "utf-8" }).trim(),
__CALCITE_VERSION__: version,
},
include: ["src/utils/config.ts"],
preventAssignment: true,
}),
],

css: {
Expand Down