-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Canvas: Inline add components (#6529)
* selected component index null directly * inline add component * fix spacing * granular events handling for triggering contextmenu * shared menu items * remove dup contextmenu in blank canvas * remove add component menu * lint * remove unused * re-add ml-2 to canvas filters * Revert "remove add component menu" This reverts commit d7a1765. * add component
- Loading branch information
1 parent
ad5843f
commit 56cd169
Showing
7 changed files
with
95 additions
and
105 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
22 changes: 22 additions & 0 deletions
22
web-common/src/features/canvas/components/menu-items.svelte
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts" context="module"> | ||
import type { CanvasComponentType } from "./types"; | ||
import ChartIcon from "../icons/ChartIcon.svelte"; | ||
import TableIcon from "../icons/TableIcon.svelte"; | ||
import TextIcon from "../icons/TextIcon.svelte"; | ||
import BigNumberIcon from "../icons/BigNumberIcon.svelte"; | ||
import type { ComponentType, SvelteComponent } from "svelte"; | ||
export type MenuItem = { | ||
id: CanvasComponentType; | ||
label: string; | ||
icon: ComponentType<SvelteComponent>; | ||
}; | ||
export const menuItems: MenuItem[] = [ | ||
{ id: "bar_chart", label: "Chart", icon: ChartIcon }, | ||
{ id: "table", label: "Table", icon: TableIcon }, | ||
{ id: "markdown", label: "Text", icon: TextIcon }, | ||
{ id: "kpi", label: "KPI", icon: BigNumberIcon }, | ||
{ id: "image", label: "Image", icon: ChartIcon }, | ||
]; | ||
</script> |
This file contains 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
This file contains 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
56cd169
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ui.rilldata.in as production
🚀 Deployed on https://67a0efa1c049f000b5891b00--rill-ui-dev.netlify.app