From a131bde8c3d6571efa304f8d1be8627f73cc928f Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Thu, 17 Oct 2024 20:40:18 +0800 Subject: [PATCH] Add a generic modal wrapper (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add generic debug dump component This makes life easy when wiring things up * Rename namespace for Context.Read.* * Groundwork: add discuss component w sheafs * Init Context.Components mod for common components * Add skeletons for Sheaf Container Container managers sheaf state within itself. Should actually make the verse-matrix use this container, sometime. * Minor changes, add some TODOs to share explicit todos Minor change * Add live component EditableMarkDisplay * Add UI improvements to EditableMarkDisplay The edit button on quick draft should only be seen when the dropdown is expanded and all the marks can be seen. The general pattern I'm trying to follow is that buttons should only be shown when an action makes sense. So here, if the user can't even see the marks currently accumulating, then the user shouldn't have the chance to edit any marks. Notice that the EditableMarkDisplay is a live_component that is a child of a function component (collapsible_marks_display). This is so that it can keep its own state and do it's own event-handling. I'm not sure if this is pattern-breaking. A reference to the actual parent live_component that calls collapsible_marks_display will always be there in case there's a need for the parent to handle any particular events. So comms b/w live_components is still going to be via phx-target values. * Change ->