polubis / 4markdown

11 stars 2 forks source link

[Feature] Make multi-tabs working easier #325

Open polubis opened 1 month ago

polubis commented 1 month ago

Context

Our current multi-tab creator behavior requires us to manage highly complex logic. To simplify this, we will replace the two duplicated views with a separate route that opens when the user clicks the multi-tab button.

Definition of Done (DoD)

  1. After clicking the Open in separate window button, a new window will open on the /creator-preview/ route.
  2. This page will be responsible solely for rendering the creator content.
  3. All other features will continue to function as before.
  4. The /creator-preview/ route will not be indexable—it will be added to the robots.txt file in the disallow field, and the page itself will have the robots="noindex, nofollow" attribute in its HTML.
  5. The mechanism for syncing any data between tabs (e.g., documents list, selected document) will be removed.
  6. Previews will be handled entirely separately, displaying only the preview without any navigation.
  7. Auto-scrolling will function if specified.
  8. When the user clicks the "Open in separate tab" button, the creator only mode will automatically be set on the main view to avoid additional clicks.
  9. Only document code is persistent - stays the same after refreshing the page.
polubis commented 1 month ago

FE: https://github.com/polubis/4markdown/pull/326

polubis commented 1 month ago

Can be tested here: https://soft-pithivier-093469.netlify.app/

KaminskiKrzysztof commented 1 month ago

✅1-4 everything works fine ✅6-8 everything works fine

5 ❌ - don't understand the "sync mechanism", can't find the difference 9 ❌ - please elaborate "document code" - don't understand the statement

MajaWielechowska commented 1 month ago

1-4 💚 5 ❤️ I don't know which mechanism you have in mind, can you specify this? 6-8 💚 9 ❤️ Could you elaborate "document code"?

polubis commented 4 weeks ago

I've moved it to done. I've verified 5,9 works fine. They were referring to more technical aspects - mb.