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

Extra time tab #1791

Merged
merged 4 commits into from
Sep 24, 2024
Merged

Extra time tab #1791

merged 4 commits into from
Sep 24, 2024

Conversation

smadbe
Copy link
Contributor

@smadbe smadbe commented Sep 20, 2024

Description

Create a new tab for the time-limited items. Currently, some backend service are still missing to complete the page, but most of it is ready already.
When it will be fully ready, I 'll ask you @Iloveall to add design and e2e tests to it.

Test cases

  • Case 1:

    1. Given I am the usual user
    2. When I go to a time-limited page
    3. And I click on "extra time" tab
    4. Then I see the basic page when not observing
  • Case 2:

    1. Given I am the usual user
    2. When I go to a time-limited page
    3. Then I see the page with the table when observing a group

@smadbe smadbe requested a review from Iloveall September 23, 2024 14:23
@else if (observedGroupInfo === undefined || false ) { <!-- loading-->
<alg-loading></alg-loading>
}
@else if (false ) { <!-- error-->
Copy link
Collaborator

@Iloveall Iloveall Sep 23, 2024

Choose a reason for hiding this comment

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

Extra space )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@else if (observedGroupInfo === null) {
<p i18n>This activity has a duration of {{ item.duration | readable }}. To list and add extra-time to some groups or users, start observation on them.</p>
}
@else if (observedGroupInfo === undefined || false ) { <!-- loading-->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extra space )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

></alg-item-permissions>

<alg-tab-bar class="tab-bar" *ngIf="!!(shouldDisplayTabBar$ | async) && !fullFrameContentDisplayed" />
@if (!(fullFrameContent$ | async)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Btw, recently I've found info about condition like that. The problem is that the first of value async is null and so false it could be reason of render component where it shouldn't.

Here is eslint rule with description https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-negated-async.md

Example: (fullFrameContent$ | async) === false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As fullFrameContent$ is a subject, can it really be null? But anyway, its default value is "false" so we would want "null" to be consider as "false", so that's correct as it is, (fullFrameContent$ | async) === false would be wrong in this case.

[itemData]="itemData"
></alg-chapter-group-progress>
}
@if (!isObserving) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like @else here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed, fixed

@smadbe smadbe requested a review from Iloveall September 24, 2024 09:24
@smadbe
Copy link
Contributor Author

smadbe commented Sep 24, 2024

@smadbe smadbe merged commit 2f61091 into master Sep 24, 2024
11 checks passed
@smadbe smadbe deleted the extra-time-tab branch September 24, 2024 10:18
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.

2 participants