Update to Profectus 0.7 #1

Merged
thepaperpilot merged 110 commits from feat/board-feature-rewrite into main 2024-12-31 13:27:34 +00:00
Contributor
No description provided.
thepaperpilot added 93 commits 2024-12-26 22:25:07 +00:00
Reviewed-on: profectus/Profectus#66
Reviewed-by: Escapee <escapee@incremental.social>
Browsers make disabled elements eat events rather than let them bubble up
This allows containers with disabled elements to have listeners still
(Used specifically so after the board rewrite, purchased upgrades can still be dragged)
This reverts commit 1c7824b550.
Includes updating vitest and supporting hotkeys with both ctrl+shift
Thanks escapee for reporting the issue!
This reverts commit 1c7824b550.
- Removed `jsx()` and `JSXFunction`. You can now use `JSX.Element` like any other `Computable` value
- `joinJSX` now always requires a joiner. Just pass the array of elements or wrap them in `<>` and `</>` if there's no joiner
- Removed `coerceComponent`, `computeComponent`, and `computeOptionalComponent`; just use the `render` function now
- It's recommended to now do `<MyComponent />` instead of `<component :is="myComponent" />`
- All features no longer take the options as a type parameter, and all generic forms have been removed as a result
- Fixed `forceHideGoBack` not being respected
- Removed `deepUnref` as now things don't get unreffed before being passed into vue components by default
- Moved MarkNode to new wrapper, and removed existing `mark` properties
- Moved Tooltip to new wrapper, and made it take an options function instead of raw object
- VueFeature component now wraps all vue features, and applies styling, classes, and visibility in the wrapping div. It also adds the Node component so features don't need to
- `mergeAdjacent` now works with grids (perhaps should've used scss to reduce the amount of css this took)
- `CoercableComponent` renamed to `Renderable` since it should be used with `render`
- Replaced `isCoercableComponent` with `isJSXElement`
- Replaced `Computable` and `ProcessedComputable` with the vue built-ins `MaybeRefOrGetter` and `MaybeRef`
- `convertComputable` renamed to `processGetter`
- Also removed `GetComputableTypeWithDefault` and `GetComputableType`, which can similarly be replaced
- `dontMerge` is now a property on rows and columns rather than an undocumented css class you'd have to include on every feature within the row or column
- Fixed saves manager not being imported in addiction warning component
- Created `vueFeatureMixin` for simplifying the vue specific parts of a feature. Passes the component's properties in explicitly and directly from the feature itself
- All features should now return an object that includes props typed to omit the options object and satisfies the feature. This will ensure type correctness and pass-through custom properties. (see existing features for more thorough examples of changes)
- Replaced decorators with mixins, which won't require casting. Bonus amount decorators converted into generic bonus amount mixin. Removed effect decorator
- All `render` functions now return `JSX.Element`. The `JSX` variants (e.g. `renderJSX`) (except `joinJSX`) have been removed
- Moved all features that use the clickable component into the clickable folder
- Removed `small` property from clickable, since its a single css rule (`min-height: unset`) (you could add a small css class and pass small to any vue feature's classes property, though)
- Upgrades now use the clickable component
- Added ConversionType symbol
- Removed setDefault, just use `??=`
- Added isType function that uses a type symbol to check
- General cleanup
Renderables no longer get wrapped in computed refs, because JSX.Elements don't like that (desyncs with the DOM)
Relatedly, a lot of display functions got fairly simplified, removing unnecessary local components
Added `MaybeGetter` utility type for something that may be a getter function or a static value (but not a ref)
Made Achievement.vue use a Renderable for the display. The object of components can still be passed to `createAchievement`
Made Challenge.vue use a Renderable for the display. The object of components can still be passed to `createChallenge`
Fixed some issues introduced by the rewrite that broke particles systems
Don't convert functions with parameters
Some checks failed
Run Tests / test (pull_request) Failing after 1m34s
8861707822
thepaperpilot added 1 commit 2024-12-26 22:45:42 +00:00
Release Profectus 0.7.0
Some checks failed
Run Tests / test (pull_request) Failing after 1m23s
1d6f09ce89
thepaperpilot changed title from Update to Profectus 0.7 to WIP: Update to Profectus 0.7 2024-12-27 05:02:05 +00:00
thepaperpilot added 16 commits 2024-12-31 13:25:21 +00:00
Renderables no longer get wrapped in computed refs, because JSX.Elements don't like that (desyncs with the DOM)
Relatedly, a lot of display functions got fairly simplified, removing unnecessary local components
Added `MaybeGetter` utility type for something that may be a getter function or a static value (but not a ref)
Made Achievement.vue use a Renderable for the display. The object of components can still be passed to `createAchievement`
Made Challenge.vue use a Renderable for the display. The object of components can still be passed to `createChallenge`
Fixed some issues introduced by the rewrite that broke particles systems
Merge remote-tracking branch 'template-fork/main' into feat/board-feature-rewrite
Some checks failed
Run Tests / test (pull_request) Failing after 2m29s
05dc162ec1
thepaperpilot changed title from WIP: Update to Profectus 0.7 to Update to Profectus 0.7 2024-12-31 13:27:28 +00:00
thepaperpilot merged commit ac9881b00d into main 2024-12-31 13:27:34 +00:00
Sign in to join this conversation.
No description provided.