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

More PatchComponent Changes #5139

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Gykes
Copy link
Contributor

@Gykes Gykes commented Aug 19, 2024

Modified all .tsx within /settings/tasks

Gykes added 2 commits August 18, 2024 18:36
Modified all .tsx within /settings/tasks
Rest of the PatchComponent changes.
Copy link
Collaborator

@WithoutPants WithoutPants left a comment

Choose a reason for hiding this comment

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

It might be worth looking over the non-exported components to see their value in being patchable/usable in plugins. It may not make sense to do them all.

}

const LogElement: React.FC<ILogElementProps> = PatchComponent(
"LogElement",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where a component is not exported, it usually indicates that it's part of a larger component. In these cases, it's ideal to name these as a sub-component of the parent component. In this case, since this is a child component of SettingsLogsPanel, I think this should be SettingsLogsPanel.LogElement. This helps reduce potential duplicate component labels.


const ScraperTable: React.FC<
PropsWithChildren<{
entityType: string;
count?: number;
}>
> = ({ entityType, count, children }) => {
> = PatchComponent("ScraperTable", ({ entityType, count, children }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

As above, I think this should be SettingsScrapingPanel.ScraperTable. I won't mark all of these, but please do a pass and correct the non-exported ones.

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