lightningrodlabs / acorn

Built with Holochain, Acorn is an open-source, peer-to-peer project management application. It is designed and built as a scrum-alternative, Agile Development Pattern for distributed software development teams. Acorn is currently in Alpha testing phase.
https://acorn.software
105 stars 10 forks source link

Layering Algorithm Constrained Width won't display cards. #299

Open TechSupport26 opened 1 year ago

TechSupport26 commented 1 year ago

If you change the Layering Algorithm to Constrained Width, if you refresh you will get the following error.


computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
useFinishMigrationChecker.ts:16 migrationData 
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
computeOutcomes.ts:22 recalculating computedOutcomes!
layoutFormula.ts:160 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'width')
    at layoutFormula.ts:160:69
    at r (d3-dag.esm.min.js:14:43432)
    at n (d3-dag.esm.min.js:14:43570)
    at d3-dag.esm.min.js:14:43733
    at Array.map (<anonymous>)
    at Cn (d3-dag.esm.min.js:14:43804)
    at t (d3-dag.esm.min.js:14:43914)
    at layoutForGraph (layoutFormula.ts:168:3)
    at layoutFormula (layoutFormula.ts:225:17)
    at performLayoutAnimation (layout.ts:77:21)
(anonymous) @ layoutFormula.ts:160
r @ d3-dag.esm.min.js:14
n @ d3-dag.esm.min.js:14
(anonymous) @ d3-dag.esm.min.js:14
Cn @ d3-dag.esm.min.js:14
t @ d3-dag.esm.min.js:14
layoutForGraph @ layoutFormula.ts:168
layoutFormula @ layoutFormula.ts:225
performLayoutAnimation @ layout.ts:77
(anonymous) @ middleware.ts:122
triggerUpdateLayout @ ProjectView.connector.tsx:67
(anonymous) @ ProjectView.component.tsx:154
Promise.then (async)
(anonymous) @ ProjectView.component.tsx:150
fulfilled @ outcomeAndAncestors.ts:37
Promise.then (async)
step @ outcomeAndAncestors.ts:37
(anonymous) @ outcomeAndAncestors.ts:37
ProjectView_component_awaiter @ outcomeAndAncestors.ts:37
(anonymous) @ ProjectView.component.tsx:130
Promise.then (async)
(anonymous) @ ProjectView.component.tsx:130
Ii @ react-dom.production.min.js:211
Vj @ react-dom.production.min.js:257
exports.unstable_runWithPriority @ scheduler.production.min.js:19
cg @ react-dom.production.min.js:122
Dj @ react-dom.production.min.js:257
(anonymous) @ react-dom.production.min.js:256
X @ scheduler.production.min.js:17
H.port1.onmessage @ scheduler.production.min.js:14

You can also change the Layering Algorithm to Minimum Height you will get a similar error and the card's won't be drawn.

You can fix this either by changing the Layering Algorithm back to default then exit the project, refresh and go back in. The cards should be visible.

This only affects the Map View.

I believe that this is also the case on Windows but I can't test it at the moment.

TechSupport26 commented 1 year ago

Just an update for this.

In versions around v7.x.x to 8.x.x this has become more card specific. I believe that if an entire project does not have a card with multiple parents, the Layering Algorithm will panic, leading to a project canvas not loading any cards. (They are still there just not loaded so when you change the Layering Algorithm they will be "recalculated") So far there will always be at least 1 Layering Algorithm that will load the project and using one of the other views works fine.

I think that this is not something that should be focused on as (It does not directly impact the users ability to use the canvas) there are still ways of seeing the cards using a different Layering Algorithm.

Thanks.

pegahvaezi commented 1 year ago

Hi @TechSupport26, does this issue still persist for you in the newest release (v9.3.1-alpha)?

TechSupport26 commented 1 year ago

No. It looks good. I will close this and if it stopes, I will reopen it.

TechSupport26 commented 1 year ago

I found another unhandled case.

If you have 2 or more cards that are not connected then only the classic view works

Log file from the developer tools. -1697164501867.log

TechSupport26 commented 1 year ago

Something that is possible as a result of this (it is a minor thing but is also fairly cool to be able to do) is creating cards in mass. When this issue is present you are not able to create cards properly, as a result you can add an outcome statement, press enter as much as you want and when you change the Layering Algorithm back, all the cards are created.