Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Arrow button on rows for panel #421

Merged
merged 4 commits into from
Aug 5, 2015

Conversation

msecret
Copy link
Contributor

@msecret msecret commented Aug 4, 2015

This UI is to make it easier to understand how to open the table
rows to show the details panel. A new table column was used to
contain the button so that everything fits within data tables
width interface. Additional styles were set from the table scss
as its generally safe to ensure these styles for any icon in the
table.

@noahmanger whats the best way to make the arrows as thick as in
the mockup? Right now they are thinner.

This UI is to make it easier to understand how to open the table
rows to show the details panel. A new table column was used to
contain the button so that everything fits within data tables
width interface. Additional styles were set from the table scss
as its generally safe to ensure these styles for any icon in the
table.

@noahmanger whats the best way to make the arrows as thick as in
the mockup? Right now they are thinner.
orderable: false,
render: function(data, type, row, meta) {
return '';
return '<i class="icon ti-angle-right"></icon>';
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong close tag

@noahmanger
Copy link
Contributor

Don't worry about the width of the arrows. We'll figure it out later with the other visual updates.

@msecret
Copy link
Contributor Author

msecret commented Aug 5, 2015

The tests failed in this case because npm failed to download some dependencies:

-npm ERR! fetch failed https://registry.npmjs.org/commander/-/commander-2.8.1.tgz
/npm ERR! fetch failed https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.2.tgz

@noahmanger
Copy link
Contributor

I can't figure out why, but they only show up if your browser is wide enough:

screen shot 2015-08-05 at 9 27 11 am

Maybe something to do with the annoying way datatables sets column widths?

@msecret
Copy link
Contributor Author

msecret commented Aug 5, 2015

@noahmanger maybe. Do I also have to add a class to ensure they show up on all breakpoints?

@noahmanger
Copy link
Contributor

Oh, I think the issue is that the width property on line 43 was too small. If I set it at 5%, it's visible on desktop, but not on mobile. If I set it to 10%, it's visible on all, but then takes up too much space.

@noahmanger
Copy link
Contributor

And also you need to add className: 'all'

Marco Segreto added 2 commits August 5, 2015 10:22
Trying to get the interface working on all screen sizes by messing
with the values.
The problem was that data tables uses absolute px values to calculate
the table columns, which means if you set the table to be 50%, it will
not work like that.

This changes the table so it's contained in a div which is 100% and
switches to 50% when the panel is active. From here, we have to ensure
data tables hides the columns which are supposed to be hidden for
the panel. This is done manually in JS (it can't be done in CSS or
data tables won't calculate the other columns correctly).

It seems this gets the data tables working on all breakpoints so its
split 50/50 with the panel when it's active.
noahmanger pushed a commit that referenced this pull request Aug 5, 2015
@noahmanger noahmanger merged commit 4626c09 into fecgov:develop Aug 5, 2015
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