bushwallyta271828 / logic_graph_scalable

This repository should support the logicgraph.dev website, taking over from logic_graph.
MIT License
0 stars 0 forks source link

Manual z index #125

Closed bushwallyta271828 closed 6 months ago

bushwallyta271828 commented 6 months ago

Taking over from the old pull request now that the branch name has changed

bushwallyta271828 commented 6 months ago

Current things to fix before merging all the way to main: (inspired by the list in the old pull request)

bushwallyta271828 commented 6 months ago

Also:

bushwallyta271828 commented 6 months ago

I'm thinking about how I'm going to implement the "Add Definition" button from a UI perspective. The challenge is that I need to extract the Claim ID of the definition from the user before the definition can be added. I think I have roughly three options:

(1) I could make the button have multiple components, like "(button) Attach (button) Definition: (input) (input)". I think it's a little ugly to have a button within a dropdown menu so I'd like to avoid this option if possible. (2) The attach definition link could could create a new element in the shape of an attached definition with an input area inside the tab. Once the user types in a valid Claim ID and presses enter, the element is replaced by the actual definition. (3) I could fill the screen with a page asking what Claim ID the user wants.

bushwallyta271828 commented 6 months ago

Okay, I definitely don't want to go with (1). (3) could work but I think that it breaks up the flow a bit too much. Also the user might be unsure which claim they're adding a definition to. I think that (2) is the cleanest approach.

bushwallyta271828 commented 6 months ago

Decision: Let's go with (2). There will be a tab where the user enters the Claim ID of the definition character-by-character, and on the right there will be some greyed out text saying "No such Claim ID exists" or "This Claim ID doesn't correspond to a definition" or something until a valid definition Claim ID has been entered. That way, if the user clicks away and nothing gets added, hopefully they know that the program doesn't think it's a valid Claim ID.

bushwallyta271828 commented 6 months ago

The next problem is how to share / manipulate this state. ClaimsContext feels like the wrong place for information like "the user is currently specifying which definition they would like to add." Somehow, the code attached to the button needs to be able to create that definition-box-shaped object. Maybe I should create a new context specifically for this purpose? That feels a little overkill.

bushwallyta271828 commented 6 months ago

Okay, I've made a huge amount of progress in the newly merged branches. My current issues before merging all the way to main include:

bushwallyta271828 commented 6 months ago

Of these remaining issues, I would split them up as follows. In order to perform this pull request:

At that point, claim-creation-ui should be finished. I should then create some new branches based off of claim-creation-ui that I will eventually merge into main. Before I merge into main:

bushwallyta271828 commented 6 months ago

For making the definition tabs more draggable, I actually think that the current functionality is adequate. It would be nice to have the ease of dragging and editing that the content regions have and I don't know why I'm not getting that, but it works well enough and since the definition text region isn't editable the user can always drag with that.

I have noticed a bug, however. When the user enters the same definition twice, the drag/drop functionality starts to break. I think I'm assigning the same ID's to different definition boxes. I need to fix that.

bushwallyta271828 commented 6 months ago

Okay, I see two main approaches going forward:

(1) Allow claims and definition attachments to appear multiple times in lists. (2) Force claims and definition attachments to appear only once in lists.

bushwallyta271828 commented 6 months ago

Okay, I was scared of (2) because users can edit definition attachments and I would have to handle the collision. I just realized that this might be easy: simply delete a definition attachment if the definitionClaimID already appears in the list, like how I delete definition attachments if the definitionClaimID is empty. That should be an easy fix.

bushwallyta271828 commented 6 months ago

Okay, the remaining issues before merging one layer up are now:

bushwallyta271828 commented 6 months ago

Okay, simplifying the active/inactive styling causes bugs. I seem to remember trying to make this simplification a while ago and it not working, so that memory was probably correct.

The big remaining tasks include:

I think that all of these tasks could be large endeavors, so I'll save them for future branches. Let's merge!