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

Implement base UI types #1009

Merged
merged 1 commit into from Nov 24, 2022
Merged

Implement base UI types #1009

merged 1 commit into from Nov 24, 2022

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Nov 23, 2022

This implements the base UI types Parent and Literal, in addition to Node.

@Mrtenz Mrtenz requested a review from a team as a code owner November 23, 2022 17:18
* markdown string.
*/
export type Heading = Infer<typeof HeadingStruct>;

export const PanelStruct: Struct<Panel> = assign(
NodeStruct,
ParentStruct,
object({
type: literal(NodeType.Panel),
Copy link
Member

Choose a reason for hiding this comment

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

You might want to restrict which kind of children are allowed in Panel.

For example, Panel probably shouldn't be able to contain other Panels.

Copy link
Member

Choose a reason for hiding this comment

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

Why not?

Copy link
Member

Choose a reason for hiding this comment

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

At some point we could allow panels to be either rows or columns for more customizability

Copy link
Member

Choose a reason for hiding this comment

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

Is Panel a UI component with it's own border and design, or is it flow component that aligns it's children somehow without no UI design?

Because if it has a border, and you nest like 10 of those, it's going to look ugly.

Copy link
Member

Choose a reason for hiding this comment

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

It currently has no design and is just a box.

@Mrtenz Mrtenz merged commit 421c727 into main Nov 24, 2022
@Mrtenz Mrtenz deleted the mrtenz/ui-base-types branch November 24, 2022 07:48
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.

None yet

3 participants