-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Apollo Client setup and ability to add/remove/update/get Project Files #1209
Conversation
…roject Cypher files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments from first browse. also please delete package-lock.json
50d13ee
to
ffe97dc
Compare
N.B. JS tests for 3.5 are failing for |
isDrawerOpen: boolean | ||
} | ||
|
||
type IActiveRelateFile = Omit<IProjectFile, 'downloadToken'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use the I-prefix in the rest of the project and I don't see the use of it in typescript, so I'd prefer the I-s be omitted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok fair enough. I like the I prefix as it makes it clear but happy to remove and rename
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The I prefix is for interfaces by convention :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Id like to keep this too. Thoughts @OskarDamkjaer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same time, I appreciate that the rest of Browser may not use it so you dont want to add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, IActiveRelateFile is not even an interface? I think the prefix makes sense in C# but not in typescript, at the very least let's not have a mix of both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will remove the I prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree here, if it's a type
it should not have a prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following up on @HerrEmil comment, we should probably change this eslint rule in relate then and update our code for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill add a card for this
…roject Cypher files
526d04c
to
e8f1067
Compare
@huboneo @OskarDamkjaer can you guys check these latest commits: These add the ability to work with params passed from Desktop and cleanups some path issues. |
9544a5a
to
20789b5
Compare
… prop to pass Editor test
width={16} | ||
buttons={buttons} | ||
editorValue={() => this.getEditorValue()} | ||
isRelateAvailable={this.props.isRelateAvailable} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in order to get tests to pass. I will look at additional tests during code freeze.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, but LGTM
relateUrl: props.relateUrl | ||
}) | ||
) | ||
const projectFiles = await Promise.all(getProjectFilePromises) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically speaking shadowing, but wont affect logic at this point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, should name it something else ideally but Ill leave it for now
|
||
// when a saved Project Script or Local Cache Script is clicked | ||
// not sure at this point which it could be | ||
bus && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this syntax is harder to read than just having if (!bus) return
above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I do agree, I just kept it in line with how its done in the rest of Browser. I can change if needed.
Browser File IO Feature Branch
How to test this work
new URL(location.href).search
) and copy them.?relateApiToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MDIxNjk1NTcsImV4cCI6MTYwMjI1NTk1N30.ktiZGi4TXzSSOa1a1WlZD7HlFU-lyVFR3-koFF89v24&relateUrl=http%3A%2F%2F127.0.0.1%3A12111&neo4jDesktopProjectId=project-6d927250-a154-4d3e-9052-a372bd269705&neo4jDesktopGraphAppRootPath=&neo4jDesktopGraphAppId=neo4j-browser-1&neo4jDesktopApiUrl=http%3A%2F%2F127.0.0.1%3A11001&neo4jDesktopGraphAppClientId=cd50b2fd9f5a8704efdf52f7e2aff663065c32b6f77e0b7b27e7f9868da9da80&neo4jDesktopInternalAppId=0bcdeecb-c3f6-4bfb-a2f8-c5e3b5e009b0
. You should be done with Desktop at this point.relateUrl
to point to:3000
(Relate). It should look something like?relateApiToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2MDIxNjk1NTcsImV4cCI6MTYwMjI1NTk1N30.ktiZGi4TXzSSOa1a1WlZD7HlFU-lyVFR3-koFF89v24&relateUrl=http%3A%2F%2F127.0.0.1%3A3000&neo4jDesktopProjectId=project-6d927250-a154-4d3e-9052-a372bd269705&neo4jDesktopGraphAppRootPath=&neo4jDesktopGraphAppId=neo4j-browser-1&neo4jDesktopApiUrl=http%3A%2F%2F127.0.0.1%3A11001&neo4jDesktopGraphAppClientId=cd50b2fd9f5a8704efdf52f7e2aff663065c32b6f77e0b7b27e7f9868da9da80&neo4jDesktopInternalAppId=0bcdeecb-c3f6-4bfb-a2f8-c5e3b5e009b0
relateApiToken
,neo4jDesktopApiUrl
orneo4jDesktopProjectId
, then then Project Files specifics will not show at all (Apollo client should not cause any problems in this case)Screenshots and Videos:
Video 1 : showing files being created, updated, removed and general UI
Video 2 : network error handling
Video 3 : graphQL error handling
Video 4 : edit file error status
changelog: Add support for storing scripts as project files when in a desktop environment (for desktop versions that support it)