diegomura / diegomura/react-pdf

Playground bugs: stale errors and error-container overlap

Open
#3,165 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

## Bug Report: React-PDF Playground Usability Issues

The React PDF Playground exhibits several usability problems that hinder code editing and testing.

---

### **1. Stale Error Messages**
- **What happens:**
After fixing an error in the code editor, the error message remains visible and does not clear until the entire page is refreshed.
- **Expected behavior:**
Error messages should disappear immediately once the underlying code is corrected.

---

### **2. Error Container Overlap**
- **What happens:**
When an error is displayed, its container overlaps the bottom of the code editor, preventing visibility and editing of the affected lines.
- **Expected behavior:**
The error panel should be docked, resizable, or otherwise non-overlapping so the full code remains accessible.

---

### **Suggestions**
🔸 Automatically clear error messages when code compiles successfully
🔸 Dock or resize the error panel to avoid covering code

---

### **Steps to Reproduce**
1. Navigate to the [React-PDF Playground](https://react-pdf.org/repl)
2. Introduce a typo (e.g., `` instead of ``)
3. Observe the error message appear

![Typo error: wrong component name](https://github.com/user-attachments/assets/2565b545-0341-4b03-87f6-59d0652d97ad)
4. Fix the typo back to ``
5. Notice the error message **remains**

![Persistent error after fix](https://github.com/user-attachments/assets/894b1a64-a426-466f-be63-ff7b20d60bd4)
6. Paste or write a long block of code and scroll to the bottom
7. Observe the error panel overlapping the code

![Error panel overlapping bottom code](https://github.com/user-attachments/assets/e5e803fb-454a-4c05-a515-b0bf97c995af)

---

### **Environment**
- **Browser:** Brave v1.78.102
- **OS:** Windows 11

---

Thank you for maintaining this project—these fixes would greatly improve the developer experience in the playground!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.