Converts Commit Details into component app #4655
Open
+740
−753
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces significant improvements to the state management and initialization of the Commit Details webview app. It adds a new context-based state provider for better state handling, updates component imports for consistency, and enhances the initialization of the root component with explicit properties. These changes set the foundation for more robust and maintainable state management across the app.
State Management Enhancements:
CommitDetailsStateProvider
class instateProvider.ts
to manage and propagate state updates using a context provider, supporting real-time updates from IPC messages and user actions.stateContext
using@lit/context
incontext.ts
to enable context-based state sharing across components.Component and Initialization Updates:
commitDetails.html
to pass explicitname
,placement
, andbootstrap
(state) properties to<gl-commit-details-app>
, improving clarity and future extensibility.webpackResourceBasePath
variable incommitDetails.html
for consistent resource loading.uncommittedSha
ingl-commit-details.ts
to reference the correct module, improving maintainability.ails webview by converting it to a component-based architecture