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

[#2058] Added status_text attribute to FeedItem, fixed issue in case_status item #1063

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

Bartvaderkin
Copy link
Contributor

@Bartvaderkin Bartvaderkin commented Feb 29, 2024

Followup on #1058

@Bartvaderkin Bartvaderkin requested review from pi-sigma and jiromaykin and removed request for pi-sigma February 29, 2024 13:18
@codecov-commenter
Copy link

codecov-commenter commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.95%. Comparing base (2c5d122) to head (8baa126).
Report is 15 commits behind head on develop.

Files Patch % Lines
src/open_inwoner/userfeed/hooks/case_status.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop    #1063    +/-   ##
=========================================
  Coverage    94.94%   94.95%            
=========================================
  Files          883      886     +3     
  Lines        31031    31191   +160     
=========================================
+ Hits         29463    29616   +153     
- Misses        1568     1575     +7     

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

Comment on lines 21 to 30
<div class="userfeed-marker userfeed-marker--warning">
{% icon icon="warning_amber" icon_position="after" extra_classes="icon--warning" outlined=True %}
<span class="userfeed__status_text">{{ item.status_text }}</span>
</div>
{% else %}
<div class="userfeed-marker userfeed-marker--info">
{% icon icon="info" icon_position="after" extra_classes="icon--default" outlined=True %}
<span class="userfeed__status_text">{{ item.status_text }}</span>
</div>
{% endif %}
Copy link
Contributor Author

@Bartvaderkin Bartvaderkin Feb 29, 2024

Choose a reason for hiding this comment

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

@jiromaykin

The status in the classnames should be dynamic, eg: userfeed-marker--{{ item.status_indicator }} or icon--{{ item.status_indicator }}.

So not an if/else switched on action_required, just use the value from the item.

So you have warning, info, error and success versions of the classes. The default is info. These are the values from open_inwoner.openzaak.constants.StatusIndicators

Copy link
Contributor

Choose a reason for hiding this comment

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

This means I still needed to add conditions to retrieve the correct icons in my most recent commit,
as I don't seem to be able to do something like this here:
{% include "components/StatusIndicator/StatusIndicator.html" with status_indicator=item.status_indicator .....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feels weird that doesn't work.

Copy link
Contributor

@jiromaykin jiromaykin left a comment

Choose a reason for hiding this comment

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

Needs to be tested with real-life data.

@jiromaykin jiromaykin force-pushed the feature/2058-actionable-userfeed branch from 9f34de9 to 8ec0761 Compare February 29, 2024 17:00
@Bartvaderkin Bartvaderkin marked this pull request as ready for review March 4, 2024 08:50
@alextreme alextreme merged commit 6bb9fed into develop Mar 4, 2024
15 checks passed
@alextreme alextreme deleted the feature/2058-actionable-userfeed branch March 4, 2024 09:35
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.

5 participants