Skip to content

dash v3.0.0rc3 - CSS did not apply on read details #3185

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

Closed
sadafnajam opened this issue Feb 24, 2025 · 1 comment
Closed

dash v3.0.0rc3 - CSS did not apply on read details #3185

sadafnajam opened this issue Feb 24, 2025 · 1 comment
Assignees
Labels
bug something broken cs customer success P1 needed for current cycle

Comments

@sadafnajam
Copy link

Thank you so much for helping improve the quality of Dash!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context
LOcal development using dash v3.0.0rc3. I used the dash code which has some CSS styling and noticed that Read details did not use the CSS

  • replace the result of pip list | grep dash below
dash                 3.0.0rc3
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table           5.0.0
  • if frontend related, tell us your Browser, Version and OS

    • OS: Mac
    • Browser Chrome
    • Version v3.0.0rc3

Describe the bug

Code used

# Import packages
from dash import Dash, html, dash_table, dcc, callback, Output, Input
import pandas as pd
import plotly.express as px

# Incorporate data
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv')

# Initialize the app - incorporate css
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = Dash(external_stylesheets=external_stylesheets)

# App layout
app.layout = [
    html.Div(className='row', children='My First App with Data, Graph, and Controls',
             style={'textAlign': 'center', 'color': 'blue', 'fontSize': 30}),

    html.Div(className='row', children=[
        dcc.RadioItems(options=['pop', 'lifeExp', 'gdpPercap'],
                       value='lifeExp',
                       inline=True,
                       id='my-radio-buttons-final')
    ]),

    html.Div(className='row', children=[
        html.Div(className='six columns', children=[
            dash_table.DataTable(data=df.to_dict('records'), page_size=11, style_table={'overflowX': 'auto'})
        ]),
        html.Div(className='six columns', children=[
            dcc.Graph(figure={}, id='histo-chart-final')
        ])
    ])
]

# Add controls to build the interaction
@callback(
    Output(component_id='histo-chart-final', component_property='figure'),
    Input(component_id='my-radio-buttons-final', component_property='value')
)
def update_graph(col_chosen):
    fig = px.histogram(df, x='continent', y=col_chosen, histfunc='avg')
    return fig

# Run the app
if __name__ == '__main__':
    app.run(debug=True)

Expected behavior

Read details should apply CSS

Screenshots

Image
@gvwilson gvwilson changed the title [BUG] dash v3.0.0rc3 - CSS did not apply on read details dash v3.0.0rc3 - CSS did not apply on read details Feb 28, 2025
@gvwilson gvwilson added bug something broken P1 needed for current cycle cs customer success labels Feb 28, 2025
@marthacryan
Copy link
Contributor

Fixed by #3188.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken cs customer success P1 needed for current cycle
Projects
None yet
Development

No branches or pull requests

3 participants