Skip to content

Refactor/simplify tile adding process - #80

Merged
codeflight1 merged 7 commits into
mainfrom
Refactor/Simplify-tile-adding-process
Sep 29, 2026
Merged

codeflight1 merged 7 commits into
mainfrom
Refactor/Simplify-tile-adding-process

Conversation

@AhnafTK

@AhnafTK AhnafTK commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

With this refactor, adding/removing a tile should be much easier. All you need to do is add/remove the import line and add/remove from the TILE_REGISTRY. The TILE_REGISTRY contains the title of the tile and the body to render.

Comment thread src/components/panels/MosaicDashboard.tsx Outdated
Comment thread src/components/panels/MosaicDashboard.tsx
@AhnafTK
AhnafTK requested a review from codeflight1 September 29, 2026 21:36
}
return (
<MosaicWindow {...windowProps}>
{TILE_REGISTRY[type]?.render() ?? <div>Unknown tile</div>}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you style the message to be black and centered so it's visible?

@codeflight1
codeflight1 merged commit ac8f754 into main Sep 29, 2026
1 check passed
@codeflight1
codeflight1 deleted the Refactor/Simplify-tile-adding-process branch September 29, 2026 23:18
@codeflight1

Copy link
Copy Markdown
Contributor

Good work! Thanks

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