Closed LaChope closed 2 years ago
Not sure what u suggest here, so I will specify what I think u meant. Let's say that we have resources:
- A
- B
- C
Moreover, I assume that resources are not ordered in alphabetical order (since I don't see them on the picture as ordered).
Then I believe you meant to have "+" button as shown below:
- A
- B +
- C
And after clicking "+" it would show an empty resource as a next sibling like this:
- A
- B
-
- C
The user can put the name of the new resource there so if he would name it "New Resource" it would end up like this:
- A
- B
- New Resource
- C
So what matters here is that we "create a next sibling of B" not "child of B". If this is the case, we should also have the option to reorder siblings (I suggest having drag&drop functionality within the "resource panel" with restriction to be able to reorder only siblings at the same level. If so, let's put it into a ticket :)
This is exactly what I meant :) I was thinking about putting the "+" between 2 rows so that user has possibility to add new resource below OR above selected row. But, as you suggested if we can reorder resources, it is not so important.
I created ticket here #40
@LaChope Works with adding as a child and also undo / redo actions work.
@PluharVit @blcham We should be able to add resources (groups) directly from the tree.
One recommended implementation could be to have a "+" icon between rows:
N.B. : For icons, I used react icons, so that you can very easily add icons as components. Of course you can do how you prefer, I just found this library very convenient.