ControlCore-Project / concore-editor

The concore Editor
http://controlcore-project.github.io/concore-editor
BSD 3-Clause "New" or "Revised" License
9 stars 19 forks source link

all graphML filesopend have same author name #105

Closed parteekcoder closed 1 year ago

parteekcoder commented 1 year ago

Reproduce

  1. open or create various graphML files
  2. try to change author name

you will notice that author name for the files will be same means you can't give different author name to different graphml files

@pradeeban please assign this issue , if this feature is not working as required by concore-editor

pradeeban commented 1 year ago

Interesting catch.

Another feature that we have yet to really use. I think it can be used in differentiating workflows with the same names from different users, as in, a workspace -- from the front-end itself, once fixed.

parteekcoder commented 1 year ago

Hi @pradeeban

Strategy to solve this issue:

  1. Now author name is not associated with the each graph state
  2. So we have to add a feild in the each graph state of authorName

Then we can easily retrieve that author name for current graph Instance

const initialState = {
    ModelOpen: false,
    modalPayload: {
        cb: () => {},
        title: '',
        submitText: '',
        Children: '',
        defaultStyle: {},
        defaultLabel: '',
        labelAllowed: null,
    },
    shareModal: false,
    settingsModal: false,
    editDetailsModal: false,
    newGraphModal: false,

    eleSelected: false,
    drawModeOn: true,
    undoEnabled: false,
    redoEnabled: false,
    graphs: [],
    curGraphIndex: 0,
    viewHistory: false,
    authorName: '',
    isWorkflowOnServer: false,
    curGraphInstance: null,
    zoomLevel: 100,
};

So here author name should be present in the each graph

pradeeban commented 1 year ago

Hi @parteekcoder, Your approach sounds good to me. It is weird that changing the author of a single graph changes all of them in how we have it currently.

parteekcoder commented 1 year ago

@pradeeban Actually now it is implemented as single authorName for superState so changing one will change all

pradeeban commented 1 year ago

No idea why it was implemented like that. It could be an oversight or a rationale behind that...

pradeeban commented 1 year ago

Tested and merged.