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

Fix notebook display issues #870

Merged
merged 3 commits into from
Apr 21, 2020
Merged

Fix notebook display issues #870

merged 3 commits into from
Apr 21, 2020

Conversation

ciyer pushed a commit that referenced this pull request Mar 25, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from 7f50402 to be7a74c Compare March 25, 2020 11:53
ciyer pushed a commit that referenced this pull request Mar 25, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from be7a74c to 941c365 Compare March 25, 2020 14:51
@ciyer ciyer changed the title Fix notebook display issues WIP: Fix notebook display issues Mar 26, 2020
@ciyer ciyer added this to the sprint-2020-03-27 milestone Mar 27, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from 941c365 to c81a86f Compare April 3, 2020 08:17
ciyer pushed a commit that referenced this pull request Apr 3, 2020
ciyer pushed a commit that referenced this pull request Apr 3, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from c81a86f to bba4586 Compare April 3, 2020 09:17
ciyer pushed a commit that referenced this pull request Apr 3, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from bba4586 to d639aae Compare April 3, 2020 09:19
ciyer pushed a commit that referenced this pull request Apr 3, 2020
ciyer pushed a commit that referenced this pull request Apr 3, 2020
- import Source Code Pro font used in output display
- display code in black
- improve styling of tables
ciyer pushed a commit that referenced this pull request Apr 3, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from d639aae to 1a85140 Compare April 3, 2020 14:14
ciyer pushed a commit that referenced this pull request Apr 14, 2020
- import Source Code Pro font used in output display
- display code in black
- improve styling of tables
ciyer pushed a commit that referenced this pull request Apr 14, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from 1a85140 to a280f82 Compare April 14, 2020 12:13
@ciyer ciyer changed the title WIP: Fix notebook display issues Fix notebook display issues Apr 15, 2020
ciyer pushed a commit that referenced this pull request Apr 15, 2020
- import Source Code Pro font used in output display
- display code in black
- improve styling of tables
ciyer pushed a commit that referenced this pull request Apr 15, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from 5660377 to f8cbb02 Compare April 15, 2020 07:32
@ciyer ciyer marked this pull request as ready for review April 15, 2020 07:33
@ciyer
Copy link
Contributor Author

ciyer commented Apr 15, 2020

So if there is the default, then there should just be the default without having to give it a name or a button. Can we make it a toggle that makes it clear that it's a global override? and if you flip it in either direction it's ignoring the cell-specific setting?

That will make it clearer. Let me think about how to implement that.

@vfried
Copy link
Contributor

vfried commented Apr 15, 2020

Hey, if the option is between two things we can use something like in the ckeditor (Coming soon)
image

That is the code for it..
<CustomInput className="float-right" type="switch" id="exampleCustomSwitch" name="customSwitch" label={switchLabel} checked={codeview} onChange={() => { setCodeview(!codeview); }} />

@ciyer
Copy link
Contributor Author

ciyer commented Apr 15, 2020

I like that switch. We could do something like

image

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

With the update, the layout looks much better 👍
I agree the switch looks nice. I would probably keep the 3 buttons but I see they may be confusing.

I have noticed a strange behavior in the "View in GitLab" button on the project's header. If you click on it, the dropdown menu is empty. Not sure how this could be related to the changes in the file components, but comparing it with dev, it seems it affects only this PR 🤔
Screenshot_20200416_084311

@ciyer
Copy link
Contributor Author

ciyer commented Apr 17, 2020

@lorenzo-cavazzi Can you check this again? It looks correct on my computer (I tried Chrome and Firefox).
image

@ciyer
Copy link
Contributor Author

ciyer commented Apr 17, 2020

This is what it looks like now:

image

image

ciyer pushed a commit that referenced this pull request Apr 17, 2020
- import Source Code Pro font used in output display
- display code in black
- improve styling of tables
ciyer pushed a commit that referenced this pull request Apr 17, 2020
@ciyer ciyer force-pushed the 838-notebook-display branch from ec04ec7 to acd6b73 Compare April 17, 2020 17:01
ciyer pushed a commit that referenced this pull request Apr 17, 2020
Show the code visibility switch as a header.

Fix #838
ciyer pushed a commit that referenced this pull request Apr 17, 2020
Use outline buttons and semi-bold for the label.

Fix #838
ciyer pushed a commit that referenced this pull request Apr 17, 2020
Extract the code visibility form as a separate component.

Fix #838
ciyer pushed a commit that referenced this pull request Apr 17, 2020
Provide a switch for changing code visibility.

Fix #838
@ciyer ciyer force-pushed the 838-notebook-display branch from acd6b73 to 15203bf Compare April 17, 2020 17:25
- import Source Code Pro font used in output display
- display code in black
- improve styling of tables
@ciyer ciyer force-pushed the 838-notebook-display branch from 15203bf to c89e935 Compare April 17, 2020 17:26
ciyer pushed a commit that referenced this pull request Apr 17, 2020
Provide a switch for changing code visibility.

Fix #838
@rokroskar
Copy link
Member

Thanks @ciyer I think that's much clearer!

Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Great feature, now it looks very polished! And thumb up for the tests, they act as documentation here 👍

I added a comment, just a minor detail on components spacing. Fell free to add the margin or just merge the PR if you like how it looks now.


const overrideControl = (displayMode === NotebookSourceDisplayMode.DEFAULT) ?
null :
<ButtonGroup key="controls" size="sm">
Copy link
Member

Choose a reason for hiding this comment

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

The Buttons look very close to the text above (see picture)

Screenshot_20200420_091024

I would add a distance, maybe className="mt-1" (or even mt-2)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried both and prefer mt-1. Here is what it looks like now.

image

Provide a switch for changing code visibility.

Fix #838
@ciyer ciyer merged commit 396d0cb into master Apr 21, 2020
ciyer pushed a commit that referenced this pull request Apr 21, 2020
- import Source Code Pro font used in output display
- display code in black
- improve styling of tables
ciyer pushed a commit that referenced this pull request Apr 21, 2020
@rokroskar
Copy link
Member

Thanks all, this is going to make the notebooks view so much better!

@ciyer ciyer deleted the 838-notebook-display branch April 21, 2020 08:36
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.

Hide input cells of notebooks by default
5 participants