Skip to content

feat: segmented checklist progress bar#3770

Merged
richardshiue merged 6 commits intoAppFlowy-IO:mainfrom
Shreesh09:segmented-checklist-progress-bar
Oct 26, 2023
Merged

feat: segmented checklist progress bar#3770
richardshiue merged 6 commits intoAppFlowy-IO:mainfrom
Shreesh09:segmented-checklist-progress-bar

Conversation

@Shreesh09
Copy link
Contributor

[FR] #3669

Feature Preview

Added segments to the checklist progress bar for number of tasks less than or equal to 5


segmented-progress-bar.mp4

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

@Xazin Xazin requested a review from richardshiue October 24, 2023 09:56
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (9416ba1) 61.06% compared to head (da0e268) 60.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3770      +/-   ##
==========================================
- Coverage   61.06%   60.99%   -0.07%     
==========================================
  Files         588      588              
  Lines       27005    27027      +22     
==========================================
- Hits        16490    16486       -4     
- Misses      10515    10541      +26     
Flag Coverage Δ
appflowy_flutter_integrateion_test 60.99% <90.32%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...dgets/row/cells/checklist_cell/checklist_cell.dart 85.55% <100.00%> (+0.67%) ⬆️
...ow/cells/checklist_cell/checklist_cell_editor.dart 96.29% <100.00%> (+0.02%) ⬆️
...w/cells/checklist_cell/checklist_progress_bar.dart 100.00% <100.00%> (ø)
...e_view/widgets/card/cells/checklist_card_cell.dart 0.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@richardshiue
Copy link
Collaborator

I'd much prefer to use a less expensive widget for each of the segment than LinearPercentIndicator since each segment will be completely filled

@Shreesh09
Copy link
Contributor Author

Yes that makes a lot of sense, I will implement the changes right away

Comment on lines +32 to +34
for (int i = 0,
j = widget.tasks.where((e) => e.isSelected).length;
i < widget.tasks.length;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can calculate what is the number of completed tasks and incompleted tasks, then do a spread operator on a List.generate

j = widget.tasks.where((e) => e.isSelected).length;
i < widget.tasks.length;
i++, j--)
Expanded(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think Flexible would be more suitable 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.

Thank you for the input, I will make both the changes

Copy link
Collaborator

@richardshiue richardshiue left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution!

@richardshiue richardshiue merged commit c2eb201 into AppFlowy-IO:main Oct 26, 2023
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