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

Dive Results dashboard #4

Merged
merged 39 commits into from
Feb 12, 2024
Merged

Dive Results dashboard #4

merged 39 commits into from
Feb 12, 2024

Conversation

xlebod
Copy link
Collaborator

@xlebod xlebod commented Feb 9, 2024

  • Take data from services instead of TestData class
  • Add example data injection
  • Add Dive Results table

Copy link

github-actions bot commented Feb 9, 2024

Test Results

  2 files  ±0    2 suites  ±0   2s ⏱️ ±0s
828 tests +2  490 ✅ ±0  338 💤 +2  0 ❌ ±0 
831 runs  +2  490 ✅ ±0  341 💤 +2  0 ❌ ±0 

Results for commit bbbf2f9. ± Comparison against base commit ad0f2b6.

♻️ This comment has been updated with latest results.

{{cnsTextOfProfile(profileB)}}
</div>
</td>
<td *ngIf="areResultsCalculated" class="{{getBgColor('cns', cnsDifference)}}">
Copy link
Owner

Choose a reason for hiding this comment

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

move as much as out of the html.

projects/planner/src/app/app.module.ts Show resolved Hide resolved
export class ProfileComparatorService {

private _profileAIndex = 0;
private _profileBIndex = 1;
Copy link
Owner

@jirkapok jirkapok Feb 9, 2024

Choose a reason for hiding this comment

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

Profile B cant be second profile, because it is not guaranteed to exist. By default there is only one dive.
Proposal: set 0 for both.

Copy link
Owner

@jirkapok jirkapok Feb 9, 2024

Choose a reason for hiding this comment

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

btw. services are singletons, e.g. after you remove dive from dives list and navigate to the diff, you need to ensure, that previously selected index still exists and this cant be done in constructor, since it is called only once. You need to do it in component OnInit, e.g. , if there are at least 2 select A=0, B=1, if index is out of range reset to 0. So you can leave 0 for both A and B while initializing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

btw. services are singletons, e.g. after you remove dive from dives list and navigate to the diff, you need to ensure, that previously selected index still exists and this cant be done in constructor, since it is called only once. You need to do it in component OnInit, e.g. , if there are at least 2 select A=0, B=1, if index is out of range reset to 0. So you can leave 0 for both A and B while initializing.

Setting of indexes will be done in the upcoming ProfileSelectorTabs component. For now the out of range was handled in diff.component.html which wouldn't render the diff page unless at least 2 profiles were created. But I've removed that and implemented proposed change above.

@xlebod xlebod force-pushed the profile-comparison branch from 7230416 to bbbf2f9 Compare February 11, 2024 22:50
@jirkapok jirkapok merged commit 9f215cd into multiple_dives Feb 12, 2024
3 checks passed
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