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

🤖 Bip Bop - Fusion Framework Release #2569

Merged
merged 1 commit into from
Nov 13, 2024
Merged

🤖 Bip Bop - Fusion Framework Release #2569

merged 1 commit into from
Nov 13, 2024

Conversation

github-actions[bot]
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@equinor/[email protected]

Major Changes

  • #2410 9d1cb90 Thanks @odinr! - rewrite bookmark module

    Needed rewrite of the bookmark module to better represent the api, and provide a more robust interface for working with bookmarks. Instead of fixing the current implementation, it was decided to rework the entire module to save time and confusion in the future.

    The v1 implementation had strong coupling with the portal code and was not a good representation of the api. The new implementation is more robust and independent of source systems. The new implementation uses zod schemas to validate requests and responses.

    The new implementation is not backwards compatible with the v1 implementation, so all ancestor modules should be updated to reflect the changes in this module.

    The new implementation has better state management and error handling, and should be easier to work with than the v1 implementation.

    Highlights:

    • has validation of configuration of the module.
    • uses the BaseConfigBuilder pattern for configuration.
    • has validation of requests and responses using zod schemas.
    • has better error handling and state management.
    • has better separation of concerns.
    • has better documentation.
    • has better state management.
    • has better flow control.
    • has better logging.

    Migration:

    • update config for enabling the module
    • check all direct access to provider interface if they are still valid

    Breaking changes:

    • The provider interface has changed
    • The client interface has changed
    • The configuration interface has changed

@equinor/[email protected]

Major Changes

  • #2410 9d1cb90 Thanks @odinr! - Total rework of api interface for bookmarks.

    The current version misrepresents the api, and does not provide a good interface for working with bookmarks. So was decided to rework the api interface to better represent the api, and provide a more robust interface for working with bookmarks. Instead of fixing the current implementation, it was decided to rework the entire module to save time and confusion in the future.

    This module is meant for internal use only, and should not be used directly by applications, so the breaking changes should not affect any applications. Ancestor modules should be updated to reflect the changes in this module.

    BREAKING CHANGES:

    • api client has been updated to reflect the new api endpoints and request/response types
    • models have been replaced with infered zod schemas
    • request and responses are now parsed and validated using zod schemas
    • file structure has been updated to reflect the new api client structure

@equinor/[email protected]

Major Changes

  • #2410 9d1cb90 Thanks @odinr! - @equinor/fusion-framework-react-module-bookmark:

    Updated the Bookmark component to use the useBookmarkComponentContext hook for accessing the bookmark provider and state.

    • Replaced the useBookmark hook with useBookmarkComponentContext in the Bookmark component.
    • Updated the BookmarkProvider component to use createContext and useContext for managing the bookmark provider state.
    • Modified the CreateBookmarkModal and EditBookmarkModal components to use the useBookmarkComponentContext hook.
    • Enhanced the BookmarkProvider component to include the current application context.
    • Improved error handling and loading state management in the Bookmark component.

Patch Changes

@equinor/[email protected]

Minor Changes

  • #2410 9d1cb90 Thanks @odinr! - Updated Bookmark Integration in Dev Portal

    • Refactored BookMarkSideSheet.tsx:

      • Replaced useHasBookmark with useCurrentAppModule<BookmarkModule>('bookmark') for better module integration.
      • Updated button disabled state to use bookmarkProvider?.hasBookmarkCreators.
    • Updated Header.tsx:

      • Added useCurrentAppModule<BookmarkModule>('bookmark') to manage bookmark module state.
      • Disabled bookmark button if bookmarkProvider is not available.
      • Passed bookmarkProvider to BookmarkProvider component.
    • Configuration Changes in config.ts:

      • Switched import from @equinor/fusion-framework-module-bookmark to @equinor/fusion-framework-react-module-bookmark.
      • Added builder.setFilter('application', true) to bookmark configuration.

@equinor/[email protected]

Minor Changes

  • #2410 9d1cb90 Thanks @odinr! - Updated bookmark namespace in @equinor/fusion-react-app to include new hooks and updated useCurrentBookmark hook.

    • Updated index.ts to re-export everything from @equinor/fusion-framework-react-module-bookmark instead of individual exports.
    • Marked useBookmark as deprecated in useBookmark.ts.
    • Enhanced useCurrentBookmark in useCurrentBookmark.ts to accept a BookmarkPayloadGenerator and use the BookmarkModule from useAppModule.

    NOTE: This change is backwards compatible and should not require any changes in consuming applications.
    NOTE: useBookmark will be removed in the next major version. Please use providers and hooks from @equinor/fusion-framework-react-module-bookmark instead.

Patch Changes

@equinor/[email protected]

Minor Changes

  • #2410 9d1cb90 Thanks @odinr! - Added new hooks useBookmarkProvider and useHasBookmark with support for custom bookmark providers. This allows for more flexible bookmark management within the Fusion Framework React Bookmark Module.

    Developers can now directly use useBookmarkProvider to get the bookmark provider instance and useHasBookmark to check if bookmark creators are present. This enhancement facilitates better integration with custom bookmark logic and improves the module's usability.

    To adapt to these changes, consumers should consider utilizing the new hooks in their applications for enhanced bookmark management capabilities. Additionally, the removal of certain dependencies and the restructuring of package.json dependencies and peerDependencies sections should be noted and adjusted for in project setups.

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Minor Changes

  • #2410 9d1cb90 Thanks @odinr! - Updated Bookmark Handling in App Component

    • Refactored App.tsx to use useLayoutEffect instead of useEffect for synchronizing the payload state with the current bookmark.
    • Replaced useState and useCallback with useRef for managing the updateData reference.
    • Simplified state management by removing BookmarkState and init and directly using payload state.
    • Updated input change handlers to directly update the payload state instead of using updateState.

    Configuration Changes

    • Updated config.ts to enable the bookmark module using enableBookmark.
    • Removed unnecessary logger level settings and configuration callbacks for a cleaner setup.

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

@equinor/[email protected]

Patch Changes

[email protected]

Patch Changes

@github-actions github-actions bot requested review from odinr and a team as code owners November 13, 2024 11:02
@github-actions github-actions bot marked this pull request as draft November 13, 2024 11:02
@odinr odinr marked this pull request as ready for review November 13, 2024 11:43
@github-actions github-actions bot added 👨🏻‍🍳 cookbooks 👾 React 💾 CLI fusion framework CLI 📚 documentation Improvements or additions to documentation 🧬 Modules labels Nov 13, 2024
Copy link
Contributor Author

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 0.39% 1746 / 445453
🔵 Statements 0.39% 1746 / 445453
🔵 Functions 22.96% 203 / 884
🔵 Branches 37.1% 384 / 1035
File CoverageNo changed files found.
Generated in workflow #8008 for commit 9ef4f84 by the Vitest Coverage Report Action

@odinr odinr merged commit 34bc212 into main Nov 13, 2024
6 checks passed
@odinr odinr deleted the changeset-release/main branch November 13, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💾 CLI fusion framework CLI 👨🏻‍🍳 cookbooks 📚 documentation Improvements or additions to documentation 🧬 Modules 👾 React
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant