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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃暪 Move controls to embed node #142

Merged
merged 2 commits into from
Jul 4, 2023
Merged

馃暪 Move controls to embed node #142

merged 2 commits into from
Jul 4, 2023

Conversation

rowanc1
Copy link
Member

@rowanc1 rowanc1 commented Jul 4, 2023

This moves the in-article controls to the top of the embed node and also fixes the z-index issues we talked about in #140. I have also removed the article notebook toolbar, I think we could bring it back, but I didn't really think it was necessary? Linked notebooks still work together!

image

@rowanc1 rowanc1 requested a review from stevejpurves July 4, 2023 04:13
Copy link
Member Author

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

A few comments @stevejpurves, I think this is complete enough to come in.

@@ -1,6 +1,7 @@
.hover-card-content {
animation-duration: 0.6s;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
z-index: 10;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only real style change for z-index.

{canCompute && article.kind === SourceFileKind.Article && <NotebookToolbar />}
{/* {canCompute && article.kind === SourceFileKind.Article && <NotebookToolbar />} */}
Copy link
Member Author

Choose a reason for hiding this comment

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

I have commented this out, but we may want to bring something like it back.

Copy link
Member

Choose a reason for hiding this comment

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

i like the idea of making it figure oriented -- all we are losing here is the ability to "run all" in one go

import { select } from 'unist-util-select';
import { useLinkProvider } from '@myst-theme/providers';

function EmbedWithControls({
Copy link
Member Author

Choose a reason for hiding this comment

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

I have moved the embed -> output node with controls here. This allows us to link to the notebook source.

I am not totally happy with it, but I think it is better than the controls being fully on the right.

@stevejpurves stevejpurves merged commit 7c29e66 into main Jul 4, 2023
1 check passed
@stevejpurves stevejpurves deleted the feat/thebe-ui branch July 4, 2023 08:52
Copy link
Member

@stevejpurves stevejpurves left a comment

Choose a reason for hiding this comment

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

馃挜

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.

None yet

2 participants