debate-map / app

Monorepo for the client, server, etc. of the Debate Map website.
https://debatemap.app
MIT License
73 stars 15 forks source link

Fix that message-boxes can extend off the screen (should wrap if too long) #80

Open Venryx opened 1 year ago

Venryx commented 1 year ago

Example: 1) Create a node with this text: (from here)

Introduction: The Diablo Canyon Power Plant is the only operational nuclear plant in California. At the start of this debate, its two nuclear reactors are set to be decommissioned in 2024 and 2025 respectively. However, there are efforts to extend the life of the power plant. This paper details the different positions that various stakeholders' take on the issue of whether the plant should remain open or closed. We have collected over 5,000 arguments, claims, and pieces of evidence from the different points of view we discovered. Parts of this collection are incomplete and need more research and analysis. In some positions you will only see "one side," when in a later version of this all for and against arguments will be linked together. Please excuse the work in progress, this collection was released early due to legislative activities. To see background information about this topic, click on this sentence and "unpack." 2) Right-click the node and press "Unlink". 3) The dialog that shows up will extend (far) off the screen; instead, the dialog should be at most the same width as the viewport, and the text should wrap to fit within that (although it should only wrap if necessary, so should use css white-space: pre-wrap, as explained in more detail here).

Venryx commented 5 months ago

This is now mitigated by having the "title" of a message-box not affect the dialog's sizing.

Can still happen if the content/"message ui" itself forces the dialog to become too large though. (though this is easier to manage case by case for now, by having a max-width on the root message-ui element)