Skip to content

Make forms and few other UI responsive #174

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wzulfikar
Copy link

@wzulfikar wzulfikar commented Apr 22, 2025

Closes #172

@wzulfikar wzulfikar changed the title Make forms responsive Make forms and few other UI responsive Apr 22, 2025
Comment on lines +714 to +715
<div className={"prose prose-sm prose-neutral space-y-4 break-words p-4 w-full"}>
<div className={"w-full lg:w-[600px]"}>
Copy link
Author

Choose a reason for hiding this comment

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

Only set the fixed width for large screen so the editor content doesn't overflow in small screen

Before:

image

After:

image

@@ -739,7 +739,7 @@ export default function Editor({ value, onChange, mode, modeSwitcher }: Markdown
</>
) : (
<>
<div className={"mb-3 grid gap-3 md:grid-cols-1"}>
<div className={"mb-3 sm:grid sm:gap-3 md:grid-cols-1"}>
Copy link
Author

Choose a reason for hiding this comment

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

Before:

image

After:

image

@@ -415,7 +415,7 @@ export default function Index() {
return router.push("/actions");
}}
className={
"flex w-full justify-center rounded border border-neutral-300 bg-white px-6 py-2 text-base font-medium text-neutral-800 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-2 sm:mt-0 sm:w-auto sm:text-sm"
"flex w-fit justify-center rounded border border-neutral-300 bg-white px-6 py-2 text-base font-medium text-neutral-800 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-2 sm:mt-0 sm:w-auto sm:text-sm"
Copy link
Author

Choose a reason for hiding this comment

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

Cancel button can go too wide in certain screen size making it looks weird. I applied the same treatment for other cancel buttons.

Before:

image image

After:

image image

Copy link
Author

Choose a reason for hiding this comment

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

All forms will get the same treatment to make it responsive:

  • Added space-y-6 sm:space-y-0 to add vertical space in small screen but still use gap in other screen (via sm:gap-6
  • Added sm: to grid classes so the UI doesn't overflow

Before:

image

After:

image

Copy link
Author

Choose a reason for hiding this comment

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

Add truncate to prevent overflow

Before:
image

After:
image

@@ -64,7 +64,7 @@ export default function Index() {
{actions ? (
actions.length > 0 ? (
<>
<div className={"grid grid-cols-1 gap-6 sm:grid-cols-2"}>
<div className={"grid grid-cols-1 gap-6 lg:grid-cols-2"}>
Copy link
Author

Choose a reason for hiding this comment

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

Action and Template cards are squeezed in medium screens. Changed from sm to lg to fix it.

Before:

ResponsivelyApp 2025-04-22 1 06 23 PM

After:

Opera 2025-04-22 1 05 42 PM

@wzulfikar
Copy link
Author

@driaug pls take a look!

@wzulfikar wzulfikar marked this pull request as ready for review April 22, 2025 10:08
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.

Form inputs overflow in small screen
1 participant