Skip to content

Commit

Permalink
accidently removing fatimas styling, reintroducted it in this commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mustachemo committed Nov 18, 2023
1 parent 21cf0d0 commit 4d345c5
Showing 1 changed file with 145 additions and 166 deletions.
311 changes: 145 additions & 166 deletions dashboard/layout.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dash import html, dcc, dash_table
import dash_mantine_components as dmc
from dash_iconify import DashIconify

layout = dmc.NotificationsProvider(html.Div([ # This is the main layout of the app

Expand All @@ -9,6 +10,7 @@
dcc.Store(id='initial-table-columns'),
dcc.Store(id='noncomplient-indices'),

# Sidebar
# Sidebar
html.Div([
html.Div([
Expand All @@ -17,182 +19,159 @@
dmc.Title(f"United States Cold Storage", order=5,),
], style={"display": "flex", "justifyContent": "center", "alignItems": "center", "gap": "1rem", "marginBottom": "1rem", "borderBottom": "1px solid #ccc", 'padding': "1rem"}),

dmc.Text("Data Analysis", variant="subtle", style={
"borderBottom": "1px dashed black", "paddingBottom": "5px"}),
dmc.Alert(id="alert-empty-and-corrupt-cells",
color="yellow"),

dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
label="Opens a modal showing which columns have corrupt/missing cells and duplicate data",
children=dmc.Button("Detailed Analysis", id="btn-detailed-analysis", style={"marginBottom": "5px"}),
),

dmc.Tooltip(
multiline=True,
width=200,
withArrow=True,
position="right",
transition="fade",
transitionDuration=300,
# transitionTimingFunction="ease",
label="Opens a modal for cell higlighting options",
children=dmc.Button("Highlight Cells", id="btn-higlight-cells",
style={"marginBottom": "5px"}),
),

dmc.Modal( # This is the modal that will open when the enforce datatypes button is clicked
title="Choose options for cell highlighting",
id="higlight-cells-modal",
zIndex=10000,
children=[
dmc.Space(h=20),
dmc.Checkbox(label="Highlight Empty/NaN/None Cells", id="highlight-empty-nan-null-cells-checkbox",
color="pink", checked=True),
dmc.Space(h=10),
dmc.Checkbox(
label="Highlight Datatype Enforced Columns", id="highlight-dtype-columns-cells-checkbox", color="pink", checked=True),
dmc.Space(h=10),
dmc.Group(
[
dmc.Button(
"Submit", id="higlight-modal-submit-button"),
dmc.Button(
"Close",
color="red",
variant="outline",
id="higlight-modal-close-button",
html.Div([
dmc.Menu([
dmc.MenuLabel("Data Analysis", style={"padding-left": "5px"}),
# dmc.MenuDivider(style={"width": 200, "padding-left": "5px"}),
dmc.Alert(id="alert-empty-and-corrupt-cells", color="yellow"),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
label="Opens a modal showing which columns have corrupt/missing cells and duplicate data",
children=dmc.Button("Detailed Analysis", id="btn-detailed-analysis", variant="subtle", leftIcon=DashIconify(icon="bx:data"),),
),
dmc.Tooltip(
multiline=True,
width=200,
withArrow=True,
position="right",
transition="fade",
transitionDuration=300,
# transitionTimingFunction="ease",
label="Opens a modal for cell higlighting options",
children=dmc.Button("Highlight Cells", id="btn-higlight-cells", variant="subtle", leftIcon=DashIconify(icon="bx:highlight"),),
),
dmc.Modal( # This is the modal that will open when the enforce datatypes button is clicked
title="Choose options for cell highlighting",
id="higlight-cells-modal",
zIndex=10000,
children=[
dmc.Space(h=20),
dmc.Checkbox(label="Highlight Empty/NaN/None Cells", id="highlight-empty-nan-null-cells-checkbox",
color="pink", checked=True),
dmc.Space(h=10),
dmc.Checkbox(
label="Highlight Datatype Enforced Columns", id="highlight-dtype-columns-cells-checkbox", color="pink", checked=True),
dmc.Space(h=10),
dmc.Group(
[
dmc.Button(
"Submit", id="higlight-modal-submit-button"),
dmc.Button(
"Close",
color="red",
variant="outline",
id="higlight-modal-close-button",
),
],
position="right",
),
],
position="right",
),
],
),


dmc.Text("User Preferences", variant="subtle", style={
"borderBottom": "1px dashed black", "paddingBottom": "5px"}), # This is the preferences header
dmc.Tooltip( # This is enforce datatypes button
multiline=True,
width=200,
withArrow=True,
position="right",
transition="fade",
transitionDuration=300,
# transitionTimingFunction="ease",
label="Enforce datatypes for each column in the table",
children=dmc.Button("Enforce DataTypes", id="btn-enforce-dtypes",
style={"marginBottom": "5px"}),
),

dmc.Modal( # This is the modal that will open when the enforce datatypes button is clicked
title="Select a column to enforce a datatype",
id="enforce-dtypes-modal",
zIndex=10000,
children=[
dmc.Space(h=20),
html.Div(id='column-type-selector'),
dmc.Space(h=20),
dmc.Group(
[
dmc.Button("Submit", id="dtype-modal-submit-button"),
dmc.Button(
"Close",
color="red",
variant="outline",
id="dtype-modal-close-button",
dmc.MenuLabel("User Preferences", style={"padding-left": "5px"}),
dmc.Tooltip( # This is enforce datatypes button
multiline=True,
width=200,
withArrow=True,
position="right",
transition="fade",
transitionDuration=300,
# transitionTimingFunction="ease",
label="Enforce datatypes for each column in the table",
children=dmc.Button("Enforce Datatypes", id="btn-enforce-dtypes", variant="subtle", leftIcon=DashIconify(icon="material-symbols:data-check"),)
),
dmc.Modal( # This is the modal that will open when the enforce datatypes button is clicked
title="Select a column to enforce a datatype",
id="enforce-dtypes-modal",
zIndex=10000,
children=[
dmc.Space(h=20),
html.Div(id='column-type-selector'),
dmc.Space(h=20),
dmc.Group(
[
dmc.Button("Submit", id="dtype-modal-submit-button"),
dmc.Button(
"Close",
color="red",
variant="outline",
id="dtype-modal-close-button",
),
],
position="right",
),
],
),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish cells that don't match their columns enforced formatting, set in user preferences",
children=dmc.Button("Enforce Formatting", id="btn-enforce-format", variant="subtle", leftIcon=DashIconify(icon="streamline:interface-edit-write-2-change-document-edit-modify-paper-pencil-write-writing"),)
),
dmc.Space(h=20),
dmc.MenuLabel("Cleaning Operations", style={"padding-left": "5px"}),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish and iterate over empty and corrupt cells",
children=dmc.Button("Check Empty/Corrupt Cells", id="btn-check-empty-corrupt-cells", variant="subtle", leftIcon=DashIconify(icon="iconoir:info-empty"),)
),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Removes duplicate rows from the imported data",
children=dmc.Button("Remove Duplicates", id="btn-remove-duplicates", variant="subtle", leftIcon=DashIconify(icon="bx:duplicate"),)
),
],
),

dmc.Tooltip( # This is enforce formatting button
multiline=True,
width=200,
withArrow=True,
position="right",
transition="fade",
transitionDuration=300,
# transitionTimingFunction="ease",
label="Enforce formatting for cells in the table. This informs the cleaning function of specific formatting for selected columns. The cleaning function will be able to pick up on these formats and clean the data accordingly.",
children=dmc.Button("Enforce Formatting", id="btn-enforce-format",
style={"marginBottom": "20px"}),
),


dmc.Text("Cleaning Operations", variant="subtle", style={
"borderBottom": "1px dashed black", "paddingBottom": "5px"}),


dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish and iterate over empty and corrupt cells",
children=dmc.Button(
"Check Empty/Corrupt Cells", id="btn-check-empty-corrupt-cells", style={"marginBottom": "5px"}),
),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Removes duplicate rows from the imported data",
children=dmc.Button(
"Remove Duplicates", id="btn-remove-duplicates", style={"marginBottom": "5px"}),
),

dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish cells that don't match their columns enforced datatypes, set in user preferences",
children=dmc.Button(
"Check Cells Datatypes", id="btn-check-cells-datatypes", style={"marginBottom": "5px"}),
),

dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish cells that don't match their columns enforced formatting, set in user preferences",
children=dmc.Button(
"Check Cells Formatting", id="btn-check-cells-formatting", style={"marginBottom": "5px"}),
),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Check all cells for any issues",
children=dmc.Button(
"Clean All", id="btn-clean-all", style={"marginBottom": "20px"}, color="red"),
),
# dmc.Button("Cancel", id="cancel-button", disabled=True),
# dmc.Checkbox(id="auto-clean-checkbox", label="Auto Clean First?", checked=True),
# dmc.Text(id="log-textbox"),


dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish cells that don't match their columns enforced datatypes, set in user preferences",
children=dmc.Button("Check Cells Datatypes", id="btn-check-cells-datatypes", variant="subtle", leftIcon=DashIconify(icon="gg:check-o"),)
),

dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Distinguish cells that don't match their columns enforced formatting, set in user preferences",
children=dmc.Button("Check Cells Formatting", id="btn-check-cells-formatting", variant="subtle", leftIcon=DashIconify(icon="mdi:checkbox-outline"),),
),
dmc.Tooltip(
withArrow=True,
width=200,
multiline=True,
position="right",
transition="fade",
transitionDuration=300,
label="Check all cells for any issues",
children=dmc.Button("Clean All", id="btn-clean-all", variant="subtle", color="red", leftIcon=DashIconify(icon="material-symbols:cleaning-services-outline"),),
),
]),
], style={"fontSize": "26px"}),
], className="sidebar"),


Expand Down

0 comments on commit 4d345c5

Please sign in to comment.