Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

QA style API with sizing examples#160

Closed
chriddyp wants to merge 12 commits intomasterfrom
styling-sizing-examples
Closed

QA style API with sizing examples#160
chriddyp wants to merge 12 commits intomasterfrom
styling-sizing-examples

Conversation

@chriddyp
Copy link
Copy Markdown
Member

No description provided.

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 23, 2018 02:20 Inactive
@chriddyp
Copy link
Copy Markdown
Member Author

I've attempted to fill out the sizing target app with the new API, but with little success. None of the table examples are responding to the style parameters. See here: https://dash-table-review-pr-160.herokuapp.com/sizing

@Marc-Andre-Rivet Can you correct these examples so that each table has similar sizing behaviour as the HTML above it? The only exception is the "Default Styles" example.

@chriddyp chriddyp changed the title sizing examples with new API QA style API with sizing examples Oct 23, 2018
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 24, 2018 13:23 Inactive
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 24, 2018 13:24 Inactive
@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

Having a look.

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

Marc-Andre-Rivet commented Oct 24, 2018

@chriddyp A lot of the first issues have to do with style_table={width: 100%} missing and content_style='grow' -- starting with ellipsis / vertical scrolldown we have some issues that are a bit more involved.

  1. The easy ones are fixed by adding to the list of supported props (the list was far from comprehensive) -- similar to the issue in QA style API with styling examples #162 (comment)
  2. The hard ones require deeper styling (e.g. ellipsis does not work because we are styling the td, not the nested div; furthermore the div styling is problematic as it uses display: flex; which causes problems with ellipsis in general)

Will commit a first batch of fixes, create a PR for the issues at 1 and continue on until all the problems left are the hard ones and we can then prioritize those.

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 24, 2018 14:01 Inactive
Marc-André Rivet added 4 commits October 24, 2018 10:23
- generator functions for style, proptypes, py2js prop mapping
…itional-props

# Conflicts:
#	dash_table/bundle.js
#	dash_table/demo.js
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 24, 2018 18:35 Inactive
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 24, 2018 18:46 Inactive
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 24, 2018 21:23 Inactive
@chriddyp chriddyp mentioned this pull request Oct 25, 2018
"overflow": "hidden",
"textOverflow": "ellipsis",
"maxWidth": 0,
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is problematic with the current cell implementation and while it can be made to work, it's not exactly clean.
Opened #178 to have a deeper look.

At the moment this would need to be done through the css props on div.dash-cell-value and additionally set the display to inline -- which will cause some alignment issues.

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-160 October 25, 2018 13:49 Inactive
@chriddyp
Copy link
Copy Markdown
Member Author

Great, thanks!

Is it currently possible to be full width but break into multiple lines?
image

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

@chriddyp Should be possible to do the word-wrap. Did it before the style refactoring. Will give it a go and post back here.

@Marc-Andre-Rivet
Copy link
Copy Markdown
Contributor

@chriddyp This is currently the best way to get ellipsis and word wrap:

Override the styling of the div element so it inherits the important props from the td parent:

css: [{
    selector: '.dash-cell div.dash-cell-value',
    rule: 'display: inline; white-space: inherit; overflow: inherit; text-overflow: inherit;'
}],

Ellipsis:

style_data_conditional: [{
    if: { column_id: 'foo_bar' },
    max_width: 100,
    min_width: 100,
    width: 100,
    white_space: 'no-wrap',
    overflow: 'hidden',
    text_overflow: 'ellipsis'
}],

Word wrap:

style_data_conditional: [{
    if: { column_id: 'foo_bar' },
    max_width: 100,
    min_width: 100,
    width: 100,
    white_space: 'normal',
    overflow: 'hidden',
    text_overflow: 'ellipsis'
}],

@chriddyp chriddyp closed this Nov 1, 2018
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the styling-sizing-examples branch July 18, 2019 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants