-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
[PR changes #392] feat: move pointer and sessionDataType to the SessionConfig #592
[PR changes #392] feat: move pointer and sessionDataType to the SessionConfig #592
Conversation
Hi @valh1996 Thanks for taking this over. Could you please resolve the merge conflicts and then ill do a review? |
Resolve conflicts: # docs/content/v0.6/2.configuration/2.nuxt-config.md # docs/content/v0.6/3.application-side/2.session-access-and-management.md # src/module.ts # src/runtime/helpers.ts # src/runtime/types.ts
Hi @zoey-kaiser, it's done, in principle it should be OK. There were many changes to merge, so I've corrected the conflicts manually. Can you just check that the new Thanks |
Hi @zoey-kaiser, hope you're well. I know I'm a bit pushy, I apologize for that but I really need this PR as I'm in the middle of rewriting my application to nuxt3. Could you please release an alpha version to be able to move forward? Once again, if anything is missing, I am available to help. In the meanwhile, i'm using a pnpm patch. |
Hi! I have some time on Thursday to do a proper review. If we want to get an alpha version out first it would be great if you could answer the following questions for me, then I don't have to look into the code myself to figure it out 😓
|
No worries, I understand, plus it's an open-source project so I'll wait and thank you again for your work^^
They will have to update their Instead, they must define the session property as follow: session: {
dataType: {
id: 'number',
username: 'string',
},
dataResponsePointer: '/data',
enableRefreshPeriodically: false,
enableRefreshOnWindowFocus: true,
} Please note the two new properties:
Yes, for example if an API returns something like : {
"data": {
"id": 1,
"username": "val"
},
"success": false
} So with the configuration above, and in particular the pointer, my user can be returned directly, so I don't have to do
Since the configuration is in the session and no longer in the provider itself, this should normally work for all providers. I will check this and correct if necessary. |
…l modifications
… + improves returned error
Hey @zoey-kaiser !
Since point 1 has been done, users will only have to remove the session: {
dataType: {
id: 'number',
username: 'string',
},
dataResponsePointer: '/data',
// enableRefreshPeriodically: false, -> now optional
// enableRefreshOnWindowFocus: true -> now optional
} Moreover, since the refresh provider is based on the local provider's |
Hi @valh1996 Thank you so much for continuing to push this! I really like the direction this PR is going in. There is one more type issue, but I think we are getting close to being able to merge 🥳 Therefore I wanted to quickly give you an outlook on the next steps:
Due to this, I will also need to check how I want to sort the docs, to ensure that there is a clear separation between the nuxt config setup from version I will discuss this once more with my team internally to see how we want to best approach this! I will keep you updated. |
Hi @phoenix-ru |
@valh1996 Thanks for a quick reaction. We have your PR planned for 0.7 because it includes some breaking changes as you already know. |
Co-authored-by: Marsel Shayhin <[email protected]>
@valh1996 Amazing, I'll consult with @zoey-kaiser if we can merge the PR and do a new release (0.8.0) or if there are any other non-breaking changes which can be included in 0.7 |
Hello @phoenix-ru any news on this one please? |
Hi @valh1996 , sorry for keeping you waiting. In the meantime, could you please resolve merge conflicts? |
sorry @phoenix-ru, I really haven't had time to look at the conflicts, no time at the moment, thanks for doing so ! |
No problem @valh1996 , I have resolved them. Sorry for keeping you waiting and good work! |
Hi,
As I don't have the rights to push directly on the original PR (#392) by @Danielwinkelmann, I'm opening a new one.
This PR includes all of @Danielwinkelmann's changes and applies @BracketJohn's latest comments.
As a reminder, here is the comment: #392 (comment)
Thus
sessionDataType
and the pointer are moved directly into theSessionConfig
and renamed to avoid redundancy with the "Session" keyword:Don't hesitate @zoey-kaiser & @BracketJohn to let me know about any changes you'd like to make so that we can move forward 🙏🏻