Skip to content

♻️(frontend) bind ui with ability access #900

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

Merged
merged 1 commit into from
Apr 30, 2025
Merged

Conversation

AntoLC
Copy link
Collaborator

@AntoLC AntoLC commented Apr 22, 2025

Purpose

Some actions were not available in the frontend but allowed in the backend.

Proposal

We bind the UI with the ability access coming from the backend.

@AntoLC AntoLC added bug Something isn't working frontend refacto labels Apr 22, 2025
@AntoLC AntoLC self-assigned this Apr 22, 2025
@AntoLC AntoLC force-pushed the refacto/ability-access branch from 5021c62 to 091e485 Compare April 22, 2025 15:53
@AntoLC AntoLC linked an issue Apr 22, 2025 that may be closed by this pull request
@AntoLC AntoLC force-pushed the refacto/ability-access branch 2 times, most recently from 12785ec to 5d0a01b Compare April 23, 2025 07:51
@AntoLC AntoLC requested a review from PanchoutNathan April 23, 2025 08:15
@@ -79,7 +79,7 @@ test.describe('Doc Export', () => {
})
.click();

await page
void page
Copy link
Member

@lunika lunika Apr 28, 2025

Choose a reason for hiding this comment

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

I didn't know it is possible to do that. It is not the same to remove await without void ? What means the usage of void here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have this rule in place: https://typescript-eslint.io/rules/no-floating-promises/

Placing the void operator in front of a Promise can be a convenient way to explicitly mark that Promise as intentionally not awaited.

So yes, it is the same to remove await without void but with a nuance, by adding void we signified to the linter that we are aware that it is a promise but that we want to just let it go (without then or await).

Some actions were not available in the frontend
but allowed in the backend, this commit binds the frontend
ui with the ability access coming from the backend.
@AntoLC AntoLC force-pushed the refacto/ability-access branch from 5d0a01b to 9ca7968 Compare April 30, 2025 15:02
@AntoLC AntoLC merged commit 9ca7968 into main Apr 30, 2025
19 of 20 checks passed
@AntoLC AntoLC deleted the refacto/ability-access branch April 30, 2025 15:21
This was referenced May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend refacto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect abilities return by the access api
2 participants