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

Update editor placeholder #146997

Merged
merged 5 commits into from
Apr 7, 2022
Merged

Update editor placeholder #146997

merged 5 commits into from
Apr 7, 2022

Conversation

bpasero
Copy link
Member

@bpasero bpasero commented Apr 7, 2022

For #130971

@lychung7 @daviddossett maybe you could give me a 👍 / 👎 on the visuals, I tried to get close to the designs from Lydia.

The main knobs to adjust is these CSS rules, and I was guessing the font-size and gap, so maybe you could just let me know if tweaks are needed.

.monaco-editor-pane-placeholder {
padding: 0 16px 0 16px;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 10px;
}
.monaco-editor-pane-placeholder:focus {
outline: none !important;
}
.monaco-editor-pane-placeholder .editor-placeholder-icon-container .codicon {
font-size: 64px;
}
.monaco-editor-pane-placeholder .editor-placeholder-label-container {
font-size: 14px;
}
.monaco-editor-pane-placeholder .monaco-link,
.monaco-editor-pane-placeholder .monaco-link:hover {
font-size: 14px;
cursor: pointer;
text-decoration: underline;
margin-left: 5px;
}

Recording 2022-04-07 at 13 44 55

//cc @misolori

The easiest to get one of these editors is to:

  • open a file
  • close VSCode
  • delete the file on disk
  • start VSCode again

@bpasero bpasero added this to the April 2022 milestone Apr 7, 2022
@bpasero bpasero self-assigned this Apr 7, 2022
@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2022

Btw disregard the notification toast showing up, it will remove next.

@miguelsolorio
Copy link
Contributor

Lydia is out for the next few days but we can take a look

@miguelsolorio miguelsolorio self-requested a review April 7, 2022 14:26
@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2022

Thanks 🙏

Pushed a change to hide icon when height is below 200px:
Recording 2022-04-07 at 16 29 29 (1)

@miguelsolorio
Copy link
Contributor

Pushed some changes to make the text a little bit more readabale:

CleanShot 2022-04-07 at 08 22 37@2x

CleanShot 2022-04-07 at 08 23 03@2x

@bpasero bpasero merged commit cd4cff3 into main Apr 7, 2022
@bpasero bpasero deleted the ben/130971 branch April 7, 2022 15:41
@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2022

Thanks! Merging in to get selfhost feedback early on, happy for more changes as a follow up as needed. I will also have to see how it looks like with multiple links appearing as actions.

I assume we would want to go with links and not buttons right?

@daviddossett
Copy link
Contributor

daviddossett commented Apr 7, 2022

Looks good! Links probably work better here given the longer strings used for actions. Feels a bit lighter compared to buttons as well.

One nit: there's a bit of inconsistency between the action phrasing. One is a brief call to action ("Try again") and another is a question ("Do you want to open it anyway?").

Could shorten to "Open anyway"?

@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2022

Thanks, yeah I can change the wording. One thing to keep in mind is that I still have to somehow move the previous error toast into this place holder including text and actions. This will probably mean:

  • error text can potentially be really large (e.g. in case of an exception) and probably needs trimming or a way to expand/collapse
  • actions will be quite arbitrary depending on the editor that threw the error

@bpasero
Copy link
Member Author

bpasero commented Apr 7, 2022

Example of a more specific error message:

image

@miguelsolorio
Copy link
Contributor

@bpasero would we be able to separate out the title + message? might help for readability, i know our toasts do not have titles so not sure what we can do here

@bpasero
Copy link
Member Author

bpasero commented Apr 8, 2022

@misolori what we can always do is show the generic error message we had before and show the specifics as details, how would you style this in CSS?

@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2022
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.

3 participants