-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag links when item is dragged #409
Comments
Thank you for the suggestion! First and foremost, I think this proposal would benefit from a clear use case that shows the benefit of this change. I have many simple sheets and generally stay away from nested tables because of their interactions with the topmost level, so I need an example to understand the benefit of the change. To understand the scope of the change, one needs to know how an item, for instance linked/unlinked glass, on the topmost level interacts with linked/unlinked glass in nested tables. From what I remember, the logic behind it makes sense, but it is not trivial. If this feature gets a go-ahead, a developer needs to make sure that the logic remains the same.
The goal of the UI is to be intuitive. I think it is not intuitive for such functionality to work one-way.
My general understanding is that the link-drag is almost certain to introduce bugs unless thoroughly tested. |
The use case is the typical situation where you have an item linked in a sub-table, and then drag that item out. This was posted on discord notice how the relesia seeds go red when the production recipe is dragged out of the nested table: Now you have to manually link the relesia seeds again at the lower level, but also unlink them at the higher level to fix it. My proposal is, that after the above drag, the link for relesia seeds is also moved to the higher level where the production recipe is moved to. |
In the demonstrated case, you want to unlink the recipe in the nested table. |
First let me establish some terminology, mostly for myself as i notice i'm confusing myself here. Topmost level is the highest level, main level. I also call this the shallowest level. To answer your list:
Proposal: For situation 4: If dragged to a higher level that contains no link, move/change/remove+add the deeper link to the new shallower level. |
Also notice the following: My reasoning for not changing the link level when all items are moved to a deeper level, is that you can still move it yourself with a single click by creating a new link at that deeper level, but, you will not get unlinked items when you create a new recipe chain -> move it to a deeper level -> create another recipe at a higher level that needs ingredients already created in the previously moved chain. This is something you'll often do, and rarely will you want to introduce a new link for that sub item. However, the above does create a more confusing model for linked items. Links are already confusing because they're not displayed in the UI very clear. Especially multiple links of the same item with overlapping levels can be confusing. Secretly moving those links might add more confusion. |
Here's what I think about it overall: This feature can make the respective part of the code much harder to understand. Therefore, I expect the potential PR for this feature to cover the points below.
I don't want our codebase to become unapproachable, so I hope these points could help it to stay at least as approachable as it was before. |
From want I just read I feel that the link system is 'just' unclear to the users... For me it is clear and it works are I expected. It is pretty technical, but when you understand it is easy enough to use as implemented.
(I think these are all rules for links, at least needed to explain what is going on) With these foundational set of rules you know what to expect from the links
So yes, moving linked items (often) result in red links, as usually there are no other items to solve/balance it with. Which is IMO a nice feature as it indicates that something is broken and needs fixing. So I see the red color as a guide for me to take care of, usually by relinking so it ties to the lower levels (again), but some other times to add more of the item that level to be able to let it balance again. I think we talked about adding some legend/popup explaining the colors, but it was not implemented. But I could be wrong. A simple automated solution would be, remove the link from the item when it moved to any different level. But I doubt this is needed if you know how the linking system works and you let yourself be guided by the colors (and don't see red links as too 'negative' instead) To summarize, for me the linking system is just fine, but like @shpaass if there is some consistent way of changing it, it would be fine to me. |
Other than possibly adding of one or more "Delete matching links in all nested tables" buttons (and possibly doing that automatically under certain circumstances), I'm also in favor of leaving the link behavior as-is. Making links move with recipes seems like more trouble than it's worth. The current behavior is very simple, if not always what the users are expecting: Links never move.
I'm having trouble making a concise description, but I think Dorus only wants to make links move (or maybe copy?), not change how tables, recipes, and links interact.
This is not actually true. You can add desired products at any level, using the "Add nested desired product" button: Which raises another test case: If you drag a recipe 'attached' to a desired product link up to a parent table that has a matching link without a desired product, what happens? Also, if both source and destination tables have links, but one has "Allow overproduction" and the other doesn't, what happens? (Nothing is an OK answer, as long as we consciously make that choice.)
There are several more cases here: If the recipe is dragged ...
If links are copied, do they also copy the requested amount, or does that stay with the original link? Does the "Allow overproduction" flag get copied? While "the users are using it wrong" is almost never right, I think there's just too much here to automatically move links. Footnotes
|
There where some ideas from discord that i like to put up for discussion:
When you make a link, it's made at the level where the current item is at. When you then drag the (production) recipe to a shallower level the link becomes red because it's now not part of the link anymore.
Proposal to fix this by moving the link with the recipe when you drag it to a shallower level, and that level does not already contain a link.
Pro would be that link become less fiddly in the simple case where you have one link per recipes.
Con would be that having multiple links for the same item could be more difficult.
Also, i think it's better to not let the link drag work the other way around, since then you might accidentally lose top-level links. Thoughts?
The text was updated successfully, but these errors were encountered: