This repository was archived by the owner on Jun 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 73
Table style #193
Merged
Merged
Table style #193
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c9ffc01
- content_style default change
27d5d06
update sizing example to fit
1c9bf0d
update width tests with 'fit'
795f671
update fixture visual tests
92db36e
- bump version
d28023a
missing entry in changelog
d3e9d2c
update font-family
08ed960
update changelog
3fe2d9d
update width percentage tests to grow again!
3f190f4
update width percentage visual tests to use new api (as much as possi…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,10 @@ interface IState { | |
forcedResizeOnly: boolean; | ||
} | ||
|
||
const DEFAULT_STYLE = { | ||
width: '100%' | ||
}; | ||
|
||
export default class ControlledTable extends PureComponent<ControlledTableProps, IState> { | ||
private readonly stylesheet: Stylesheet; | ||
private readonly tableFn: () => JSX.Element[][]; | ||
|
@@ -620,7 +624,9 @@ export default class ControlledTable extends PureComponent<ControlledTableProps, | |
const rawTable = this.tableFn(); | ||
const grid = derivedTableFragments(n_fixed_columns, n_fixed_rows, rawTable); | ||
|
||
const tableStyle = this.tableStyle(style_table); | ||
const tableStyle = R.mergeAll( | ||
this.tableStyle(DEFAULT_STYLE, style_table) | ||
); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Table style is now a combination of the prop and some default style |
||
|
||
return (<div | ||
id={id} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import (reference) '~dash-table/style/reset.less'; | ||
|
||
.inset-shadow(@color, @left, @top, @right, @bottom) { | ||
box-shadow: inset @left 0px 0px 0px @color, | ||
inset 0px @top 0px 0px @color, | ||
|
@@ -167,12 +169,11 @@ | |
} | ||
|
||
.dash-spreadsheet-container { | ||
.reset-css(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consolidating component.less into Table.less |
||
display: flex; | ||
flex-direction: row; | ||
position: relative; | ||
} | ||
|
||
.dash-spreadsheet-container { | ||
.dash-spreadsheet-inner { | ||
box-sizing: border-box; | ||
display: flex; | ||
|
@@ -383,7 +384,7 @@ | |
.dash-spreadsheet-inner table { | ||
border-collapse: collapse; | ||
|
||
font-family: monospace; | ||
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace; | ||
--accent: hotpink; | ||
--border: lightgrey; | ||
--text-color: rgb(60, 60, 60); | ||
|
@@ -493,10 +494,6 @@ | |
outline: none; | ||
} | ||
|
||
.numeric { | ||
font-family: monospace; | ||
} | ||
|
||
.toggle-row { | ||
border: none; | ||
box-shadow: none; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ const data = (() => { | |
const baseProps = { | ||
setProps, | ||
id: 'table', | ||
content_style: 'fit', | ||
data | ||
}; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ const data = (() => { | |
const baseProps = { | ||
setProps, | ||
id: 'table', | ||
content_style: 'fit', | ||
data | ||
}; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ const data = (() => { | |
const baseProps = { | ||
setProps, | ||
id: 'table', | ||
content_style: 'fit', | ||
data | ||
}; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default is now 'grow' -- a lot of tests are updated below to conserve behavior