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

Create tables for Validation app #143

Merged
merged 12 commits into from
Feb 7, 2024
Merged

Create tables for Validation app #143

merged 12 commits into from
Feb 7, 2024

Conversation

tsmbland
Copy link
Member

@tsmbland tsmbland commented Jan 30, 2024

Continuing with #121. This PR is just about setting the layout of the tables, showing the right data, and conditional colouring of cells. I still need to write callbacks and buttons to make this functional, and decide on the overall layout of the app

Close #138

@tsmbland tsmbland linked an issue Jan 30, 2024 that may be closed by this pull request
@tsmbland tsmbland changed the title Tables Create tables for Validation app Jan 31, 2024
@tsmbland tsmbland marked this pull request as ready for review January 31, 2024 16:12
@tsmbland tsmbland changed the base branch from validation to develop January 31, 2024 16:13
Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

This looks good, although dash isn't super easy to read. My only somewhat major comment at this time is the scrollbars one: there are too many! Is there anything we can do about it?

Also, I thought you were planning to put the tables in tabs. Whatever you choose is ok, just checking if you changed your mind.

# Create layout
app.layout = html.Div([dcc.Graph(figure=plot)])
# Layout
app.layout = html.Div(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this results in an odd number of vertical scroll bars.

  • I've the external one - the normal one of the browser.
  • The internal one to scroll a single table.
  • An intermediate one that apparently scrolls through the two tables and the plot.

I don't think I see the point of this intermediate scrollbar and, moreover, it makes the navigation rather complicated. Is there a way of removing it and leave just two (the browser one and the table specific one)?.
Screenshot from 2024-02-05 17-27-55

Copy link
Member Author

Choose a reason for hiding this comment

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

This seems to have fixed itself in a later PR

"resizable": True,
"sortable": True,
"checkboxSelection": {
"function": "params.column == params.columnApi.getAllDisplayedColumns()[0]"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is this params object coming from? Or, in other words, how this checkboxSelection business work?

Copy link
Member Author

Choose a reason for hiding this comment

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

params is a Javascript object created under the hood. This is JS code to ensure the checkbox is always associated with the left-most column.

from variable.models import Variable

# Create a Dash app
DEFAULT_FONT = "Open Sans, Raleway, Dosis, Ubuntu, sans-serif"

app = DjangoDash("DailyValidation")

# Filters (in final app this will get data from forms)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not logged in and all this DB querying works fine. Nothing to worry about at this time, as this part is under development, but at some point this will need to go thorugh the authentication system - specially the validation view, not so much @CWestICL 's reporting view.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add this as a separate issue

@tsmbland tsmbland changed the base branch from develop to dash_validation February 7, 2024 15:01
@tsmbland tsmbland merged commit e55ee96 into dash_validation Feb 7, 2024
5 checks passed
@tsmbland tsmbland deleted the tables branch February 7, 2024 15:02
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.

Convert tables from javascript to python (plotly/dash)
2 participants