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

Webapp: Design improvements #2018

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ interface ModalButtonsProps {
onCancel?: () => void;
onSubmit?: (e: any) => void;
}
export default function ModalButtons({ submitText = 'Submit', areDisabled = false, areBusy, onCancel, onSubmit }: ModalButtonsProps) {
export default function ModalButtons({
submitText = 'Submit',
areDisabled = false,
areBusy,
onCancel,
onSubmit,
}: ModalButtonsProps) {
return (
<Flex
justify="end"
className={css.modalButtons}
>
<Flex justify="end" className={css.modalButtons} gap={4}>
<Button
isBusy={areBusy}
disabled={areDisabled}
Expand All @@ -32,5 +35,5 @@ export default function ModalButtons({ submitText = 'Submit', areDisabled = fals
{submitText}
</Button>
</Flex>
)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ export function Sidebar({
aria-orientation={undefined}
>
{/* Padding 3px is because of focus on dropdown button */}
<Flex justify="space-between" direction="row" style={{ padding: '3px'}}>
<Flex
justify="space-between"
direction="row"
style={{ padding: '3px' }}
>
<h1 className="sr-only">WordPress Playground</h1>
<div className={css.sidebarHeader}>
{/* Remove Playground logo because branding isn't finalized. */}
Expand All @@ -111,21 +115,15 @@ export function Sidebar({
<>
<WordPressPRMenuItem
onClose={onClose}
disabled={
offline
}
disabled={offline}
/>
<GutenbergPRMenuItem
onClose={onClose}
disabled={
offline
}
disabled={offline}
/>
<GithubImportMenuItem
onClose={onClose}
disabled={
offline
}
disabled={offline}
/>
<RestoreFromZipMenuItem
text="Import from .zip"
Expand Down Expand Up @@ -214,10 +212,7 @@ export function Sidebar({
>
Saved Playgrounds
</Heading>
<MenuGroup
className={css.sidebarList}
label="Saved Playgrounds"
>
<MenuGroup className={css.sidebarList}>
{storedSites.map((site) => {
/**
* The `wordpress` site is selected when no site slug is provided.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,11 @@ export default function GitHubExportForm({

if (pushResult) {
return (
<form id="export-playground-form" onSubmit={handleSubmit}>
<form
id="export-playground-form"
onSubmit={handleSubmit}
className="typography"
>
<h2>
Pull Request{' '}
{formValues.prAction === 'create' ? 'created' : 'updated'}!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ export default function GitHubImportForm({

return (
<GitHubOAuthGuard>
<form id="import-playground-form" onSubmit={handleSubmit}>
<form
id="import-playground-form"
onSubmit={handleSubmit}
className="typography"
>
<p>
You may import WordPress plugins, themes, and entire
wp-content directories from any public GitHub repository.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function Authenticate({
[css.disabled]: mayLoseProgress && !exported,
});
return (
<div>
<div className="typography">
<p>
Importing plugins, themes, and wp-content directories directly
from your public GitHub repositories.
Expand Down
3 changes: 2 additions & 1 deletion packages/playground/website/src/github/preview-pr/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,13 @@ export default function PreviewPRForm({
disabled={submitting}
label="Pull request number or URL"
value={value}
autoFocus
onChange={(e) => {
setError('');
setValue(e);
}}
/>
{errorMsg && <div>{errorMsg}</div>}
{errorMsg && <div className={css.error}>{errorMsg}</div>}
</div>
<ModalButtons
areDisabled={submitting}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@
margin: 0;
}
}

.error {
color: #f00;
}
Loading