Skip to content

Commit 0a57fab

Browse files
HarshitaDPoojaryCarson-Shaar
authored andcommitted
fix: updates as per PR 277 comments
1 parent 394c132 commit 0a57fab

6 files changed

Lines changed: 5 additions & 115 deletions

File tree

zero_true/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
from zt_backend.models.state.state import state
2121
from zt_backend.models.state.state import global_state
2222
from zt_backend.models.components.chat_ui import chat_ui
23-
from zt_backend.models.components.list import ListComponent, ListItem, ListGroup, ListItemTitle, ListItemSubtitle, ListSubheader
23+
from zt_backend.models.components.list import ListComponent, ListItem, ListItemTitle, ListItemSubtitle, ListSubheader
2424

2525

zt_backend/models/components/list.py

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,36 +55,6 @@ class ListItem(ZTComponent):
5555
)
5656

5757

58-
class ListGroup(ZTComponent):
59-
"""List Group is used to group multiple list items in one category"""
60-
61-
component: str = Field(
62-
"v-list-group", description="Vue component name for List group"
63-
)
64-
title: str = Field("", description="Title of the List Group")
65-
color: str = Field(None, description="Background color of the List Group")
66-
density: str = Field(
67-
"default",
68-
enum=["default", "comfortable", "compact"],
69-
description="Density of the component",
70-
)
71-
width: Union[int, str] = Field("100%", description="Width of the List")
72-
height: Union[int, str] = Field("100%", description="Height of the List")
73-
value: str = Field("", description="Expands / Collapse the list-group.")
74-
disabled: bool = Field(False, description="removes ability to click List Item")
75-
collapse_icon: str = Field(
76-
"$collapse", description="Icon to display when the list item is expanded."
77-
)
78-
expand_icon: str = Field(
79-
"$expand", description="Icon to display when the list item is collapsed."
80-
)
81-
childComponents: List[str] = Field(
82-
[],
83-
description="List of child component ids to be placed within the ListGroup. List Items come as child Components of the Group",
84-
)
85-
##subgroup:bool= Field(False, description="subgroup for List Group")
86-
87-
8858
class ListItemTitle(ZTComponent):
8959
"""List Item Title is used to specify the title of the Lsit Item. Use Text component to provide the title details and pass it to the child component of List Item."""
9060

@@ -98,6 +68,7 @@ class ListItemTitle(ZTComponent):
9868
tag: str = Field("div", description="specify a custom tag used on root element")
9969

10070

71+
# TODO: debug opacity
10172
class ListItemSubtitle(ZTComponent):
10273
"""List Item SubtitleTitle is used to specify the Subtitle of the List Item. Use Text component to provide the text details of the subtitle and pass it to the child component of List Item"""
10374

@@ -112,6 +83,7 @@ class ListItemSubtitle(ZTComponent):
11283
tag: str = Field("div", description="specify a custom tag used on root element")
11384

11485

86+
# TODO: debug the title prop
11587
class ListSubheader(ZTComponent):
11688
"""List SubHeader is used to specify the Sub Header of the List. Use Text component to provide the title details and pass it to the child component of List."""
11789

zt_backend/models/generate_schema.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from .components.timer import Timer
2121
from .components.iframe import iFrame
2222
from .components.html import HTML
23-
from .components.list import ListComponent
2423
import json
2524

2625
def generate_json(model, name):
@@ -63,5 +62,4 @@ def generate_schema():
6362
generate_json(Text,'text')
6463
generate_json(Timer,'timer')
6564
generate_json(iFrame,'iframe')
66-
generate_json(HTML,'html')
67-
generate_json(ListComponent,'list')
65+
generate_json(HTML,'html')

zt_backend/models/notebook.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from zt_backend.models.components.autocomplete import Autocomplete
1919
from zt_backend.models.components.card import Card
2020
from zt_backend.models.components.timer import Timer
21-
from zt_backend.models.components.list import ListComponent, ListItem, ListGroup, ListItemTitle, ListItemSubtitle, ListSubheader
21+
from zt_backend.models.components.list import ListComponent, ListItem, ListItemTitle, ListItemSubtitle, ListSubheader
2222

2323
def deserialize_component(data: Dict[str, Any]) -> ZTComponent:
2424
component_map = {
@@ -38,7 +38,6 @@ def deserialize_component(data: Dict[str, Any]) -> ZTComponent:
3838
"plotly-plot": PlotlyComponent,
3939
"v-list": ListComponent,
4040
"v-list-item": ListItem,
41-
"v-list-group":ListGroup,
4241
"v-list-item-title":ListItemTitle,
4342
"v-list-item-subtitle":ListItemSubtitle,
4443
"v-list-subheader":ListSubheader

zt_frontend/src/components/ComponentWrapper.vue

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ import {
5050
VCard,
5151
VList,
5252
VListItem,
53-
VListGroup,
5453
VListItemTitle,
5554
VListItemSubtitle,
5655
VListSubheader
@@ -78,7 +77,6 @@ export default {
7877
"plotly-plot": PlotlyPlot,
7978
"v-list":VList,
8079
"v-list-item": VListItem,
81-
"v-list-group": VListGroup,
8280
"v-list-item-title": VListItemTitle,
8381
"v-list-item-subtitle": VListItemSubtitle,
8482
"v-list-subheader": VListSubheader
@@ -128,23 +126,6 @@ export default {
128126
),
129127
};
130128
},
131-
getEventBindings(component: any) {
132-
if (component.component === "v-list") {
133-
return {};
134-
}
135-
136-
return {
137-
[component.triggerEvent]: () =>
138-
this.runCode(true, component.id, component.value),
139-
keydown: ($event: any) =>
140-
this.handleEnterPress(
141-
$event,
142-
component.id,
143-
component.component,
144-
component.value
145-
),
146-
};
147-
},
148129
149130
handleEnterPress(e: any, id: string, component_type: any, value: any) {
150131
// Run code when Enter is pressed in a text, number or text are field

zt_frontend/src/types/list.d.ts

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)