-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Enhancements] [Bryce] - Publish Modal #2454
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
base: main
Are you sure you want to change the base?
Conversation
Minor updates to the UI in the publish modal: Updated error states, hover states on "fix w/ AI button", implementing divider lines correctly.
@BJP-GU is attempting to deploy a commit to the Onlook Team on Vercel. A member of the Team first needs to authorize it. |
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
const demoNonDomainError = true; // or false to disable the demo | ||
|
||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that the functions 'renderDomain', 'renderNoDomain', and 'renderActionSection' are defined but not used in the final return. Remove unused code to keep the component clean.
</> | ||
); | ||
}; | ||
|
||
const renderActionSection = () => { | ||
if (!domain?.url) { | ||
console.warn('No domain URL found:', domain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove or disable debug logging (console.log and console.warn) before production deployment to avoid exposing internal state.
console.warn('No domain URL found:', domain); |
@@ -18,8 +18,13 @@ export const EditorEngineProvider = ({ children, projectId }: { | |||
const editorEngine = useMemo(() => new EditorEngine(projectId), [projectId]); | |||
|
|||
useEffect(() => { | |||
// Expose editor engine to window for debugging purposes | |||
(window as any).editorEngine = editorEngine; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exposing 'editorEngine' to the window is useful for debugging, but ensure to remove or restrict this in production to avoid potential security risks.
(window as any).editorEngine = editorEngine; | |
if (process.env.NODE_ENV !== "production") (window as any).editorEngine = editorEngine; |
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
</div> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
const demoNonDomainError = true; // or false to disable the demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded flag demoNonDomainError = true
will force error states to display in all environments including production. This appears to be intended for UI demonstration purposes only. For production deployment, this should either be:
- Set to
false
by default - Replaced with actual error detection logic
- Made configurable via environment variables
- Removed entirely if no longer needed for demonstration
Without this change, users will always see error states regardless of actual publishing status.
const demoNonDomainError = true; // or false to disable the demo | |
const demoNonDomainError = false; // Set to true to demonstrate error states |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Description
Updated UI/UX for the Publish Modal: Reduced cognitive load for initial publish action, refined error state experience, added new buttons to address publish errors, simplified UI for "Add custom domain" button.
Related Issues
Type of Change
Testing
Compared updated results in localhost against my Figma mockups.
Screenshots from localhost:
Publish Update:

Error State Updates:

Important
Enhances Publish Modal UI/UX with improved error handling, domain linking, and debugging features.
PublishDropdown
inindex.tsx
to includePreviewDomainSection
andCustomDomainSection
with separators.AdvancedSettingsSection
andView Site
button inindex.tsx
.UrlSection
inurl.tsx
to handle invalid URLs and display error messages.CustomDomainSection
andPreviewDomainSection
to handle error states and retry logic.preview-domain-section.tsx
andcustom-domain-section.tsx
.demoNonDomainError
flag for demo purposes inpreview-domain-section.tsx
andcustom-domain-section.tsx
.editorEngine
to the window for debugging ineditor/index.tsx
.preview.ts
to useHOSTING_DOMAIN
constant for domain creation..husky/pre-commit
to use absolute paths forbun
commands.This description was created by
for b21486e. You can customize this summary. It will automatically update as commits are pushed.