tinacms / tinacms

A fully open-source headless CMS that supports Markdown and Visual Editing
https://tina.io
Apache License 2.0
11.19k stars 564 forks source link

Editor button to go back to parent not there when selecting a rich text field in live preview #4475

Open guillermodlpa opened 1 month ago

guillermodlpa commented 1 month ago

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

When clicking on a rich-text field from the live editor iframe, there's no button to go back to the parent. This button saying "HERO":

Captura de pantalla 2024-03-27 a las 17 58 35

Disappears when navigating here by clicking on a rich-text field on the page:

Captura de pantalla 2024-03-27 a las 17 59 19

I was able to debug a bit the internals of Tina and catch that the component PanelHeader isn't receiving props.name in that case. But it does receive it when I set debugging points around. So maybe some object is being mutated in the code and having debugging points affects how it happens.

Video:

https://github.com/tinacms/tinacms/assets/1557348/3832927e-3ab8-49fd-944c-5d3a07c1b7d1

I replicated this with both Tina ^1.5.24 (the one in the starter template right now) and 1.6.0.

Reproduction

https://github.com/tinacms/tina-cloud-starter

Steps to reproduce

Set up:

  1. Create a block that has a rich-text field inside. The starter template has one already in the home page.

Steps:

  1. On the live preview page, click on the rich text field. Expected: to see the block name on the top of the sidebar. Actual: no block name button in the sidebar. You have to click another editable field in the live page for it to appear.

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
    Memory: 1.63 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    Yarn: 3.6.3 - ~/Projects/abogali/tina-cloud-starter/node_modules/.bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v16.14.2/bin/npm
  Browsers:
    Chrome: 123.0.6312.86
    Safari: 17.2.1
  npmPackages:
    @tinacms/cli: ^1.5.34 => 1.5.34
    tinacms: ^1.6.0 => 1.6.0

Validations