Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Migrate Layers to React Functions #80

Closed
wants to merge 10 commits into from
Closed

Migrate Layers to React Functions #80

wants to merge 10 commits into from

Conversation

okjodom
Copy link
Contributor

@okjodom okjodom commented Sep 13, 2020

Closes issue #55

  • Rewrite Layer as a react functional component
  • Split out layer view rendering into manageable files. Moved logical bootstrap form groups into Layer.forms file
  • Validate layer functionality after rewrite

Please review after PR #79 .

Copy link
Owner

@stellasia stellasia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JoDoM , sorry for the longest review ever! This PR looks good to me overall. I have made two important comments regarding the neo4j driver syntax, otherwise it fails (tested on my laptop).

Also, the I can't have both the list of available labels and the list of available properties at the same time, in the best scenario, only one of these two lists is filled with data. This is not the case on the master branch.

src/services/neo4jService.js Outdated Show resolved Hide resolved
src/services/neo4jService.js Outdated Show resolved Hide resolved
src/components/Layer.js Outdated Show resolved Hide resolved
Show query
</Button>

<Button variant="success" type="submit" onClick={handleUpdateLayer} >
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it was from a previous PR, but realized afterwards so just putting the comment here:

I think it should be to the user to decide whether he wants to create or update a layer, the app should know whether the layer already exists or not.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And actually, the addLayer and updateLayer functions could be merged (we don't have to worry about performances, we'll never have hundreds of layers).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was more concerned with single responsibility for each declared function rather than perf :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be to the user to decide whether he wants to create or update a layer, the app should know whether the layer already exists or not.

Exactly. Having two buttons explicitly require a user to make the decision if they want to update or create new. Functionally, that decision also means a user can quickly clone a new layer out of an old one if that's desirable

src/components/Layer.js Outdated Show resolved Hide resolved
@okjodom
Copy link
Contributor Author

okjodom commented Nov 21, 2020

Also, the I can't have both the list of available labels and the list of available properties at the same time, in the best scenario, only one of these two lists is filled with data. This is not the case on the master branch.

I see. Working on this issue. Marked this PR as draft until I resolve

@okjodom okjodom marked this pull request as draft November 21, 2020 20:48
@okjodom
Copy link
Contributor Author

okjodom commented Jan 8, 2021

Publishing to run CI job. This branch has a new react-select bug.
image

Pointers for when I get time to resolve:

@okjodom okjodom marked this pull request as ready for review January 8, 2021 15:26
@okjodom okjodom marked this pull request as draft February 2, 2021 08:18
@stellasia stellasia changed the base branch from master to master_dev February 10, 2021 11:33
@okjodom okjodom closed this Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants