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

[#1508] My profile messages #654

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Conversation

pi-sigma
Copy link
Contributor

@pi-sigma pi-sigma commented Jun 7, 2023

Links for sending messages to contacts are displayed if and only if a message page exists and is set to be published.

Taiga: #1508

@pi-sigma pi-sigma force-pushed the issue/1508-my-profile-messages branch from 414b91f to 766ad85 Compare June 7, 2023 07:09
@pi-sigma
Copy link
Contributor Author

pi-sigma commented Jun 7, 2023

  • UX: after hiding the link to send messages for active contacts in case the messaging page is unpublished, should we also get rid of the link for contacts that still need approval? Or should the link be displayed as disabled so as to signal to the user: messaging is available in principle, but for this particular contact it is temporarily disabled (current situation)?

  • Implementation: the solution filters Page objects by application_namespace and checks for the first page if it is published. At first I naively assumed that the result of filtering by application_namespace would be unique, but the resulting queryset has two elements (with is_draft=True and is_draft=False respectively). Both however are is_published=True. I double-checked and noticed noticed that this is the case for every application_namespace. I'll be looking into the CMS documentation to see if I can figure out why this is (and whether the implementation is wrong), but if someone with more experience with CMS could shed some light on this, that would be great.

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2023

Codecov Report

Merging #654 (27023b5) into develop (6be1f1c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #654   +/-   ##
========================================
  Coverage    96.45%   96.46%           
========================================
  Files          618      619    +1     
  Lines        21857    21889   +32     
========================================
+ Hits         21083    21115   +32     
  Misses         774      774           
Impacted Files Coverage Δ
.../open_inwoner/accounts/tests/test_contact_views.py 100.00% <100.00%> (ø)
.../open_inwoner/accounts/tests/test_profile_views.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/utils.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/views/contacts.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/views/profile.py 99.31% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@alextreme alextreme requested a review from vaszig June 7, 2023 08:52
@pi-sigma pi-sigma force-pushed the issue/1508-my-profile-messages branch from 766ad85 to 27023b5 Compare June 7, 2023 14:41
@pi-sigma pi-sigma requested a review from vaszig June 12, 2023 12:33
@pi-sigma pi-sigma force-pushed the issue/1508-my-profile-messages branch from 27023b5 to 3fc1e01 Compare June 13, 2023 06:40
@pi-sigma pi-sigma requested a review from vaszig June 13, 2023 06:40
Copy link
Contributor

@vaszig vaszig left a comment

Choose a reason for hiding this comment

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

I am sorry but I now noticed that the asserts you are doing concerning the texts in the response are not translatable. There are several across the PR (I mentioned only the first one), let's fix these as well.

@pi-sigma pi-sigma force-pushed the issue/1508-my-profile-messages branch 3 times, most recently from cd42290 to 03d2f11 Compare June 14, 2023 06:39
@pi-sigma pi-sigma requested a review from vaszig June 14, 2023 07:38
@Bartvaderkin Bartvaderkin changed the title Issue/1508 my profile messages [#1508] My profile messages Jun 14, 2023
@pi-sigma pi-sigma force-pushed the issue/1508-my-profile-messages branch from 03d2f11 to 4083622 Compare June 15, 2023 08:11
@pi-sigma pi-sigma requested a review from vaszig June 15, 2023 09:13
@pi-sigma pi-sigma requested a review from alextreme June 16, 2023 13:09
@alextreme alextreme merged commit 810e2aa into develop Jun 16, 2023
@alextreme alextreme deleted the issue/1508-my-profile-messages branch June 16, 2023 16:36
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.

4 participants