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

Introducing interfaces & context class structure for portal metadata #1033

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gshivi
Copy link
Contributor

@gshivi gshivi commented Sep 6, 2024

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 as IPortalMetadata, IWebsite, IPageTemplate, IWebFile, IContentSnippet, IWebTemplate, IWebpage, IEntityList, IWebForm, and IEntityForm. These interfaces define the structure and types of data used in the portal metadata & its context.

Portal Metadata Context Class:

@gshivi gshivi requested review from a team as code owners September 6, 2024 12:22
@gshivi gshivi changed the title Introducing interfaces & class strucuture Introducing interfaces & context class strucuture for porta metadata Sep 6, 2024
@gshivi gshivi changed the title Introducing interfaces & context class strucuture for porta metadata Introducing interfaces & context class structure for porta metadata Sep 6, 2024
@gshivi gshivi changed the title Introducing interfaces & context class structure for porta metadata Introducing interfaces & context class structure for portal metadata Sep 6, 2024
export class PortalMetadataContext {

private portalMetadata: IPortalMetadata;
private portalMetadataContext: IContextItem;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be an array right?

adx_registerstartupscript?: string;
}

export interface IContextItem {
Copy link
Contributor

Choose a reason for hiding this comment

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

lets rename this to IPortalMetaDataContext

private portalMetadataContext: IContextItem;


public getPortalMetadataContext() {
Copy link
Contributor

Choose a reason for hiding this comment

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

lets have a set funciton for initilization here - also this should be a singleton class -check WebExtensionContext for referecen

// updates portalMetadataContext
}

private updatePortalMetadata() {
Copy link
Contributor

Choose a reason for hiding this comment

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

we need get/set for portalMetadata too in addtion to update. Moreover update should target at more granular updates and not entire list reset

// updates portalMetadata
}

private createPortalMetadataContext() {
Copy link
Contributor

Choose a reason for hiding this comment

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

create is not the right terminology - lets use get/set/update for both of these members and use singleton class as suggested above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants