Dynamic Layouts: Powering Personalized Learning

LeetCode • 2023 • PM & Product Designer

Problem Statement
Static Layout, Dynamic Needs

The QD page has been a cornerstone of LeetCode, offering coding challenges with real-time evaluations. It played a key role in the platform’s growth, helping millions of users sharpen their skills. But as the product evolved, so did the QD page—becoming increasingly cluttered, rigid, and frustrating for users.

Hard to Navigate
The cluttered layout left users feeling lost, unable to locate key functions, or forced them to open multiple browser tabs just to solve a challenge.
High Maintenance Costs
With over 10 tightly coupled functional modules, every update introduced complexity and risk, making changes both time-consuming and fragile.
Not Scalable
As new features were added, they quickly became a burden on the static design, which couldn’t adapt to the platform’s growing needs or diverse user workflows.
design Impact
Redefining Learning with Dynamic Layout

We designed the Dynamic Layout to give users full control over their workspace, allowing them to manage layouts and workflows with intuitive interactions. Tailored to align with unique goals and preferences, it redefines how users learn and solve challenges. By early 2024, the Dynamic Layout launched globally, transforming the QD page with a flexible, task-focused, and seamless interface.

2.3%

Submission Rate Increase

Empowered users to submit solutions with ease and confidence.

1.5%

Accepted Rate Increase

Enhanced tools and focus helped users write more accurate code.

And... 

Scale & Collaborate

Expanded to enhance Competition experiences and enable Collaborative Coding.

Your Ideal Workspace, One Drag Away

Create your perfect coding environment. Drag, drop, and design—complete freedom is yours to shape.

Every Pixel Counts

Make space for what matters most. Adjust the size of panes effortlessly using our smart splitter to fit your exact needs.

Amplify Your Focus

Maximize your workspace for focus. Expand for details, collapse for space—control every element of your environment.
Seamlessly code, reference solutions, and take notes—all in one place
See Results with Greater Clarity
Onboarding Users with Guided Configuration
Guided Customization Throughout the Journey
Story Behind the Design
Breaking Through Bias

User feedback painted a conflicting picture: what thrilled power users frustrated beginners—and vice versa. Existing research focused too heavily on active users, ignoring the needs of casual and novice learners. To bridge the gap, I turned to online communities where users openly shared their challenges.

The insight was striking:

No two workflows were alike.
But were these diverse workflows solely a result of different users?

As I dug deeper, I found it wasn’t just about who the users were—it was also situational. A single user’s workflow could shift based on their goals, the type of problem they were tackling, or even their confidence that day.

It’s the interplay of individual and situational factors that shapes a wide variety of learning paths. This diversity made it clear: a one-size-fits-all design wouldn’t work.

A flexible, adaptable, and scalable environment was essential to support users’ dynamic workflows and ever-evolving needs.
Turning a Vision into a Mission

The idea was ambitious but faced major hurdles: conflicting priorities between global and China teams, and the risks of rebuilding a core function with unpredictable user acceptance. The team had been stuck patching issues, unable to move forward.

Without a PM, I stepped up to pitch the Dynamic Layout as a bold yet practical solution. Backed by data, user stories, and prototypes to demonstrate its value and feasibility.

The pitch secured stakeholder buy-in, clarified project goals, and set a clear design strategy. With the project greenlit, I collaborated with developers to prioritize tasks and create a phased plan, ensuring steady progress while managing risks.

Modular Foundation
Creating a scalable framework by decoupling components for flexibility and maintainability.
Flexible Controls
Empowering users with intuitive interactions to adapt seamlessly to diverse workflows.
Enhanced Content
Unleashing potential with improved text clarity, data visualization, and tool efficiency.
Laying the Modular Foundation

The QD page’s architecture was a tangle of interconnected modules, where adjusting one feature often caused unexpected breaks elsewhere. A fundamental overhaul was necessary.

I led an audit of the layout to map dependencies and reusable elements. To rebuild efficiently, I worked closely with developers, decoupling modules one by one while running design and development in parallel.

This approach resulted in a scalable, modular framework of panes, tabs, and toolbars. By separating foundational functionalities from core features, we created a cleaner, well-organized structure that was flexible and easy to maintain.

Crafting Dynamic Interactions

With the modular foundation in place, the next step was enabling users to take full control of their workspace. Drag-and-drop emerged as the centerpiece for flexibility, but making it intuitive required careful design and iteration.

Aligning Rules with Intentions

My first attempt at defining drag-and-drop hit areas caused misplacements during testing due to awkward angles. Inspired by real-world behavior, I redesigned the structure: stacking centrally for stability and using edges for accessibility.

Introducing a "merge" command and logical hit zones allowed users to add or combine elements effortlessly, ensuring flexibility without chaos.

Responding to Movement Triggers

Predictability was key to making dragging intuitive. Users needed immediate feedback at every step to feel confident about their actions.

Detachment

The dragged component visually separated from its original position, shrinking into a thumbnail that followed the cursor. This mimicked the act of picking up an object, providing immediate confirmation of the action.

Highlighting Drop Zones

As users moved the component, valid drop areas lit up instantly, reducing guesswork and guiding them to logical placements.

Smooth Transitions

Once dropped, the layout adjusted seamlessly, snapping components into place without disrupting the flow.
Testing, Iterating, and Finding Balance

Early demos revealed excitement about flexibility but concerns over cognitive overload. Using Kanban for transparent management, we iterated quickly. Public beta testing surfaced key challenges, leading us to refine the balance between flexibility and structure, ensuring a more intuitive user experience.

Iteration 1: Progressive Disclosure

Testing workflows like "viewing a new solution post" revealed conflicting user needs. Advanced users wanted flexibility, while others struggled with extra tabs and broken layouts.

Realizing "one design doesn’t fit all," I implemented Progressive Disclosure: a default simplified layout for most users, with advanced options for power users. This layered approach balanced complexity and accessibility.

One-click Layout Switching

Detect quick-browsing behaviors (e.g., viewing 3 posts in 30 min) and proactively offer advanced layout settings.

Advanced Configuration

Allow users to define rules for how sub-content is opened and where it appears.
Iteration 2: Assisted Focus

Flexibility risked distraction as the Dynamic Layout scattered attention. Leveraging visual attention principles, I developed a three-step solution: ensure visibility, provide real-time updates, and use visual cues to guide focus. This proactive approach kept users engaged and minimized distractions in complex workflows.

Iteration 3: Guided Configuration

Launching a new version often disorients users, risking inefficiency. To ease the transition, I balanced familiarity with onboarding—combining default adoption, optional reversion, and guided tours. This minimized the learning curve and left users feeling confident and supported.

Unlocking Productivity Potential

The modular foundation and flexible layout set the stage for a dynamic learning environment, but unlocking its full potential required refining the content itself. We focused on three key areas: formatting, graphs, and tools.

Formatting: Clarity Above All

The problem description is the first thing users see, and it needs to be clear, readable, and actionable. Initially, it was cluttered and hard to read, overwhelming users with dense information. I restructured the layout to transform cluttered, dense text into clear, actionable guidance.

Emphasizing key info

Non-essential details are moved lower in the layout.

Minimizing distractions

Additional info is shown on demand, keeping the focus on the problem at hand.

Improving flow

Paragraphs are spaced properly, with balanced visuals free of unnecessary fills.

Error messages posed another hurdle, with up to 7 inconsistent types causing confusion. By modularizing these into reusable components, I created a unified system that made errors easier to understand and resolve.

Graphs: Making Insights Actionable

Graphs were critical for AC submissions but were hampered by poor navigation and missing indicators. I redesigned them to highlight key metrics and added a mini-map for advanced users to zoom in on data ranges.

To further streamline the experience, I integrated community-shared solutions directly into the graph layout. Users could now access code samples with a single click, eliminating disruptive modal switches.

Tools: Empowering Advanced Users

Driven by advanced coding needs, assistant tools like the Raw Editor, Code Formatter, and AI-powered Complexity Analysis elevate the experience to a new level of professionalism.

Raw Editor

Let users toggle between a tab-based editor and a raw code editor, offering simplicity for novices and control for experts.

Code Formatter

Optimize code with proper indentation, spacing, and line breaks, improving readability and quality.
Takeaways
Lead Through Design
With no PM, I stepped up to lead, crafting a vision and rallying the team. The Dynamic Layout’s success proved how design can drive not just interfaces but strategy and alignment, turning challenges into opportunities.
Navigating Complexity Together
Remote collaboration came with hurdles—global team, differing priorities, and communication gaps. But with open syncs and mutual trust, we stayed united. My team’s dedication made complexity rewarding.
Learning and Balancing
Resistance to change taught me to listen deeply and adapt. By balancing bold ideas with user needs, I prioritized purpose over perfection, turning feedback into meaningful improvements.