Skip to content
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

[Web] make clientService more developer friendly #11107

Open
12 tasks
kulmann opened this issue Jun 28, 2024 · 2 comments
Open
12 tasks

[Web] make clientService more developer friendly #11107

kulmann opened this issue Jun 28, 2024 · 2 comments
Labels
Type:Story User Story

Comments

@kulmann
Copy link
Member

kulmann commented Jun 28, 2024

Description

At the moment you can shoot yourself in the foot quite easily by destructuring the clientService (e.g. const { webdav } = useClientService(). The destructured respective client (here: webdav) will not a reactive authentication. Meaning that after a token renewal the destructured client will not have valid authentication anymore. See #11068 for one of our own fallouts from this.
Since destructuring objects is a quite common concept in the JS ecosystem we should avoid this pitfall.

User Stories

  • As a developer, I don't want to fall into the trap of losing valid authentication, so that I don't deliver a version of my app that has failing requests after a token renewal.

Value

DX

Acceptance Criteria

One of the following:

  • forbid destructuring the client service (I don't see how...)
  • make sure that the destructured clients from the client service have a reactive authentication

Definition of ready

  • Everybody needs to understand the value written in the user story
  • Acceptance criteria have to be defined
  • All dependencies of the user story need to be identified
  • Feature should be seen from an end user perspective
  • Story has to be estimated
  • Story points need to be less than 20

Definition of done

  • Functional requirements
    • Functionality described in the user story works
    • Acceptance criteria are fulfilled
  • Quality
    • Code review happened
    • CI is green (that includes new and existing automated tests)
    • Critical code received unit tests by the developer
  • Non-functional requirements
    • No sonar cloud issues
@kulmann kulmann added the Type:Story User Story label Jun 28, 2024
@kulmann kulmann changed the title make clientService more developer friendly [Web] make clientService more developer friendly Jun 28, 2024
@AlexAndBear
Copy link
Contributor

Could we use getters for singleton instances here, or would that result in the same issue ?

@dschmidt
Copy link
Member

I guess we can make every object reactive instead of only the "top level" one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Story User Story
Projects
Status: Backlog
Development

No branches or pull requests

3 participants