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

Updates to data export button. (archived in SC) #475

Merged
merged 5 commits into from
May 31, 2022

Conversation

labkey-klum
Copy link
Contributor

Rationale

As part of this feature request, we want to consolidate the export buttons for CSV and Excel formats into a single menu style button. We will be planning to use this button when data export support is added to the learn pages but for now this story is just to create the new component and wire it into the existing MAb and data grids.

image

Changes

  • add a new export button component
  • styling to match specifications
  • replace existing MAb and data grid buttons with the new button
  • fix existing automated tests

@labkey-klum labkey-klum requested review from XingY and cnathe May 27, 2022 19:05
@@ -6228,7 +6228,6 @@ x-boundlist-item {
from(#fb4770),
to(#fb2e5c)
);
border-radius: 9px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

they wanted square, not rounded button edges on hover

background-repeat: no-repeat;
background-position-x: 0%;
background-size: 12px;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

admittedly, my CSS foo is pretty limited so I would be interested in hearing if there are ideas to handle this more efficiently

margin-left: 10px;
}
.export-item-icon {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIzLjAuNiwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA5IDEwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA5IDEwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6IzAwMDAwMDt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik05LDd2MnYxSDhIMUgwVjdoMXYyaDdWN0g5eiBNNy4zMywzLjk0TDYuNjIsMy4yM0w1LDQuODVWMEg0djQuODVMMi4zOCwzLjIzTDEuNjcsMy45NEw0LjUsNi43N0w3LjMzLDMuOTR6Ii8+Cjwvc3ZnPgo=);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can those svgs be saved in webapp/Connector/images/ as files and then used as file path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, but I thought it would be easier to use just the inlined data versions rather than check in two separate files that are only used in one place each. Do you know if there are pros/cons of one over the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

swtiched to the more traditional SVG files...

Copy link
Contributor

Choose a reason for hiding this comment

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

It's more of a personal preference. I found the file way to be more readable and consistent. For the "export" icon case, the inline method might have the advantage of being able to define a single css selector with the svg, but use additional selector to change just the color part of it. It looks good as is.

@@ -941,3 +941,33 @@ img.detail-has-data-very-small {
text-transform: uppercase;
}
}

/* Data export button, with light arrow icon */
.x-btn-rounded-inverted-accent-small .x-btn-arrow-light {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the spec is expecting the arrow to point up when menu is expanded. Is that handled as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not right now, I was going to ask the client if that were a must have versus nice to have since it doesn't easily fall out of the Ext4 implementation. I'm sure I could do it but would add more CSS complexity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

implemented the up arrow when the menu is opened...

…oded element id, clean up CSS for export button
@labkey-klum labkey-klum requested a review from XingY May 30, 2022 17:07
@cnathe cnathe removed their request for review May 31, 2022 13:26
@labkey-klum labkey-klum merged commit edf2c4a into release22.3-SNAPSHOT May 31, 2022
@labkey-klum labkey-klum deleted the 22.3_fb_export_data branch May 31, 2022 15:02
@wendyinnis wendyinnis changed the title Updates to data export button Updates to data export button. (archived in SC) Aug 1, 2022
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.

2 participants