Introducing interfaces & context class structure for portal metadata#1033
Open
Introducing interfaces & context class structure for portal metadata#1033
Conversation
tyaginidhi
reviewed
Sep 9, 2024
| export class PortalMetadataContext { | ||
|
|
||
| private portalMetadata: IPortalMetadata; | ||
| private portalMetadataContext: IContextItem; |
Contributor
There was a problem hiding this comment.
this should be an array right?
tyaginidhi
reviewed
Sep 9, 2024
| adx_registerstartupscript?: string; | ||
| } | ||
|
|
||
| export interface IContextItem { |
Contributor
There was a problem hiding this comment.
lets rename this to IPortalMetaDataContext
tyaginidhi
reviewed
Sep 9, 2024
| private portalMetadataContext: IContextItem; | ||
|
|
||
|
|
||
| public getPortalMetadataContext() { |
Contributor
There was a problem hiding this comment.
lets have a set funciton for initilization here - also this should be a singleton class -check WebExtensionContext for referecen
tyaginidhi
reviewed
Sep 9, 2024
| // updates portalMetadataContext | ||
| } | ||
|
|
||
| private updatePortalMetadata() { |
Contributor
There was a problem hiding this comment.
we need get/set for portalMetadata too in addtion to update. Moreover update should target at more granular updates and not entire list reset
tyaginidhi
reviewed
Sep 9, 2024
| // updates portalMetadata | ||
| } | ||
|
|
||
| private createPortalMetadataContext() { |
Contributor
There was a problem hiding this comment.
create is not the right terminology - lets use get/set/update for both of these members and use singleton class as suggested above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces context for portal metadata by adding interfaces and a context class. The most important changes include defining interfaces for portal metadata and introducing a class to manage this metadata. It methods will be further implemented.
Portal Metadata Interfaces:
src/common/portal-metadata-context/Interfaces.ts: Added interfaces for various portal metadata entities, such asIPortalMetadata,IWebsite,IPageTemplate,IWebFile,IContentSnippet,IWebTemplate,IWebpage,IEntityList,IWebForm, andIEntityForm. These interfaces define the structure and types of data used in the portal metadata & its context.Portal Metadata Context Class:
src/common/portal-metadata-context/PortalMetadataContext.ts: Introduced thePortalMetadataContextclass, which includes methods for managing portal metadata and its context. This class provides methods to get, update, and create portal metadata and its context.