Skip to content

Conversation

@nnecla
Copy link
Contributor

@nnecla nnecla commented Feb 4, 2025

Description

This pr is to pass the db and the dbms connection information to the preview experience.

@nnecla
Copy link
Contributor Author

nnecla commented Feb 4, 2025

@nnecla nnecla force-pushed the preview-passing-db-info branch from 163a345 to 865ed0b Compare February 5, 2025 09:39
Copy link
Contributor

@daveajrussell daveajrussell left a comment

Choose a reason for hiding this comment

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

I wonder if there's anything we can do anything for the automatic redirect that we do from index.tsx if the user has the prefersOldBrowser flag set to false 🤔

I don't think the store has been initialized at that point.. but I wonder if we could manually look into localstorage at the neo4j.connections data, if there's an active connection, we could try and extract this and use it when redirecting? (I don't know if this is a horrible idea or not)

Screenshot 2025-02-05 at 10 05 39

@nnecla
Copy link
Contributor Author

nnecla commented Feb 5, 2025

I wonder if there's anything we can do anything for the automatic redirect that we do from index.tsx if the user has the prefersOldBrowser flag set to false 🤔

I don't think the store has been initialized at that point.. but I wonder if we could manually look into localstorage at the neo4j.connections data, if there's an active connection, we could try and extract this and use it when redirecting? (I don't know if this is a horrible idea or not)

Screenshot 2025-02-05 at 10 05 39

Himmm, even though we can make it work, I am not sure if it is a good practice to access a persisted key directly using the localStorage.getItem.

Also, if someone prefers the query already, the last connection that they had(or not had) was in the query application, and we already store this information there. So, in that case, I think it would be better to rely on the logic in query and not forward the browser's old connection? i think this can only be a problem if a user, for the first time, opens the preview experience, does not make a connection, and reloads the app again after cleaning the url parameters.

@nnecla nnecla merged commit b4d39ab into master Feb 5, 2025
16 checks passed
@nnecla nnecla deleted the preview-passing-db-info branch February 5, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants