Refactor: Modernize Blog Submission UI & Add Live Preview Toggle#18
Open
AbhishekMauryaGEEK wants to merge 2 commits intovaibhavxtripathi:mainfrom
Open
Refactor: Modernize Blog Submission UI & Add Live Preview Toggle#18AbhishekMauryaGEEK wants to merge 2 commits intovaibhavxtripathi:mainfrom
AbhishekMauryaGEEK wants to merge 2 commits intovaibhavxtripathi:mainfrom
Conversation
Contributor
|
@AbhishekMauryaGEEK is attempting to deploy a commit to the Vaibhav Tripathi's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
@AbhishekMauryaGEEK I like the compact design but it introduces a new problem of horizontal gaps in the design. That empty space was the reason why the stretched view came in the first place. Kindly figure out a design principle that address both issues and attach the screenshot in your next reply. Thanks. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
This PR focuses on improving the user experience and visual hierarchy of the blog submission interface within the Student Dashboard. The primary goal was to transition from a "stretched" full-screen layout to a more contained, professional dashboard aesthetic while adding high-value features for student contributors.
🛠️ Key Changes
Contained Workspace: Wrapped the submission form in a max-w-4xl container to ensure the UI remains balanced on high-resolution monitors.
Natural Content Expansion: Removed the max-height and internal scrollbars from the MarkdownEditor to allow the editor to expand naturally with the content.
Visual Balance: Replaced the full-width (oversized) submit button with a fixed-width 200px button, aligned to the right to follow standard "action-path" UX patterns.
Live Visualization (Preview Mode): Introduced a preview state and a toggle switch that allows users to see their Markdown rendered in real-time before submission.
Dual Image Support: Integrated a file upload trigger (using lucide-react's Upload icon) alongside the existing URL input, providing flexibility for blog cover images.
Auth Restoration: Verified that the RequireAuth wrapper is active to protect student-specific routes.
Database Synchronization: Verified backend compatibility using a Neon.tech PostgreSQL instance to ensure the submitBlog mutation functions correctly.
✅ Testing & Verification
UI Check: Verified the layout at http://localhost:3000/student?view=my-blogs.
Functionality Check: Confirmed that the "Preview" mode correctly renders the blog title, cover image, and Markdown content.
Mobile Responsiveness: Confirmed the submit button scales back to w-full on mobile screens for better accessibility.
📸

Before :
After:
After: A centered, professional dashboard card with a dedicated "Preview" mode and right-aligned action buttons.