Skip to content

Add repr_html for CubeLists#3313

Merged
bjlittle merged 5 commits into
SciTools:masterfrom
DPeterK:cubelist_repr
Oct 2, 2019
Merged

Add repr_html for CubeLists#3313
bjlittle merged 5 commits into
SciTools:masterfrom
DPeterK:cubelist_repr

Conversation

@DPeterK

@DPeterK DPeterK commented May 15, 2019

Copy link
Copy Markdown
Member

As a (long-delayed) follow-on to a previous PR to add cube html repr (see #2918), this adds html repr functionality to CubeList objects. The html repr is designed to be reasonably simple, retaining the content of the original CubeList repr while adding an accordion effect that, when a cube in the list is clicked, expands to reveal the html repr of that cube.

Comment thread lib/iris/experimental/representation.py Outdated
Comment thread lib/iris/tests/unit/experimental/representation/test_CubeListRepresentation.py Outdated
@DPeterK

DPeterK commented May 15, 2019

Copy link
Copy Markdown
Member Author

For want of a properly interactive notebook that demonstrates this in operation, here's a static screengrab of what the repr looks like (with one cube in the list expanded to show the embedded cube repr):

Screenshot 2019-05-15 at 17 05 04

@bjlittle

bjlittle commented Jul 9, 2019

Copy link
Copy Markdown
Member

@DPeterK Fancy doing a re-base?

We just fixed the travis-ci tests on master, and I'm hoping this will tidy up your CI failures.

Reference #3349

@bjlittle

Copy link
Copy Markdown
Member

Ping @DPeterK 😉

@DPeterK

DPeterK commented Jul 15, 2019

Copy link
Copy Markdown
Member Author

@bjlittle ping noted; unfortunately I'm busy now! I'll see what I can do.

@bjlittle

Copy link
Copy Markdown
Member

@DPeterK No worries 😉

@DPeterK

DPeterK commented Aug 23, 2019

Copy link
Copy Markdown
Member Author

@bjlittle I did it 😁

@DPeterK

DPeterK commented Aug 23, 2019

Copy link
Copy Markdown
Member Author

... shame the tests still didn't pass 😢

Edit: but it looks like it's just a license header thing 🎉 I'll fix...

@DPeterK

DPeterK commented Aug 27, 2019

Copy link
Copy Markdown
Member Author

I've updated the CSS for the cubelist repr, including making use of jupyter variables to define elements of the style. This means the cubelist repr will correctly follow jupyter lab themes. When combined with #3380 the cubelist repr now looks like the following:

Light theme:
Screenshot 2019-08-27 at 15 32 16

Dark theme:
Screenshot 2019-08-27 at 15 31 57

@bjlittle

bjlittle commented Oct 2, 2019

Copy link
Copy Markdown
Member

@DPeterK Awesome, LGTM 👍

@bjlittle bjlittle merged commit 8ca7e85 into SciTools:master Oct 2, 2019
@DPeterK DPeterK deleted the cubelist_repr branch October 2, 2019 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants