ubc-carnap-team / Rudolf

Truth Tree Widget for Carnap
2 stars 3 forks source link

Implement Rows #35

Closed McTano closed 4 years ago

McTano commented 4 years ago
  1. We need to be able to mark each node with its "row" (which will be 1 greater than whatever the last "row" created was.
  2. Nodes in the tree should be spaced vertically so that they are displayed alongside nodes on other branches which are in the same row.

This will allow us to associate each node with a reference back to the node which we resolved by creating it.

kylemas commented 4 years ago

So the "row" would be a similar idea to the values we gave last time to each node to connect them?

McTano commented 4 years ago

Kind of. It depends what you mean by "similar idea".

The idea is that the rows of the tree are numbered, like so:

1.          P           Ass.
2.          Q           Ass.
3.      ~(P /\ Q)       Ass.
        /        \
4.     ~P        ~Q     (3 ~/\E)

So we can tell that the ~P and ~Q nodes were created to resolve the formula on row 3. There are better examples in thefor-all-x textbook.

kylemas commented 4 years ago

Okay, got it!

kylemas commented 4 years ago

@McTano Hey Tristan, I did some work on this last week but was not able to continue much this week due to midterms / other commitments.

Right now, I have the rows showing up though not as expected. What I did was have an anchor tag to display the node row (which I've assigned to each node) inside the NodeView. However, it's showing up with each node since I have it inside the div of the node id. I've tried a few other ways to implement this but I haven't been able to succeed in getting it to appear only per row.

Was wondering if you could offer a different perspective on this?

My branch is just called 'nodeRows'

kylemas commented 4 years ago

Here are some screenshots.

Screen Shot 2019-10-27 at 10 51 11 PM Screen Shot 2019-10-27 at 10 50 44 PM
McTano commented 4 years ago

@kylemas If you want me to take a look at your code, you should open a pull request. That's what they're for. If it's not ready to merge, just mark it as a "draft pull request" when you create it.

kylemas commented 4 years ago

@McTano Hey, sorry about that, completely forgot! Will open one up now.

Thanks!