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

Comments posted by validators should be visible to enumerator in field. #2179

Open
manjitapandey opened this issue Feb 12, 2025 · 5 comments
Assignees
Labels
enhancement New feature or request frontend Related to frontend code testing:ready Ready for testing

Comments

@manjitapandey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Feedback provided by Tokha team,
Currently, during validation, Validators can post the comment. That is mostly used when user something is wrong with the submission and needs resurvey. But enumerator in field are not being able to know what is wrong and why the submission has been rejected. Communicating through phone call and social media is also difficult since its very hard to communicate the building.

Describe the solution you'd like
A section on feature to show the comment if any from validator's side to the mapper. This way mapper will know what's wrong with their previous form and why has the submission marked has issues.

Describe alternatives you've considered
If possible two way communication could be better but if we don't wanna over complicate the workflow. One way communication could also work. Meaning, Mapper can only see the comments if validators post any reason but can't reply back.

Additional context
Further design on mapper's page need to be decided on how to visualise the comment.

@manjitapandey manjitapandey added the enhancement New feature or request label Feb 12, 2025
@spwoodcock
Copy link
Member

Hmm this is a good idea, but we have no way to add comments to features in FMTM currently.

Identify the building with issues

The following should be possible though:

  • Mark feature as BAD.
  • The colour of the feature is updated / flashing

Does this not help identify the building?

Notify user with manager comments

The manager could also add a comment to the task for the user to view, but I agree this probably isn't very intuitive to the user.

As we have realtime notifications for task comments already, perhaps we could add the functionality of tagging the user? If the manager specifies @username in the comment, we can create a popup in the centre of the users screen instantly, to notify them?

(Of course this only works when they have FMTM open)

@manjitapandey
Copy link
Contributor Author

manjitapandey commented Feb 13, 2025

but we have no way to add comments to features in FMTM currently.

Actually we can add feature level comment when validating a feature.

but we have no way to add comments to features in FMTM currently.

this helps a lot in identifying the building however, its also important to communicate with them what they are doing wrong through comments.

As we have realtime notifications for task comments already, perhaps we could add the functionality of tagging the user? If the manager specifies @username in the comment, we can create a popup in the centre of the users screen instantly, to notify them?

this is also a good idea. But what I was thinking was we could visualise the comment when mapper clicks on pop-up of that feature. Something like this.

Image

@spwoodcock
Copy link
Member

but we have no way to add comments to features in FMTM currently.

Actually we can add feature level comment when validating a feature.

but we have no way to add comments to features in FMTM currently.

this helps a lot in identifying the building however, its also important to communicate with them what they are doing wrong through comments.

As we have realtime notifications for task comments already, perhaps we could add the functionality of tagging the user? If the manager specifies @username in the comment, we can create a popup in the centre of the users screen instantly, to notify them?

this is also a good idea. But what I was thinking was we could visualise the comment when mapper clicks on pop-up of that feature. Something like this.

Image

Oh I get you, let's definitely do that!

Review comments are stored in ODK for features, so it would require an API call when the feature is clicked 😅 that's doable for now, but further complicates a fully offline FMTM

@spwoodcock
Copy link
Member

spwoodcock commented Feb 19, 2025

Proposed Solution: Comment Tagging

  • On the call I suggested there was some backend work, but I think it's all frontend - sorry @NSUWAL123! 😅
  • It's a small amount of work for the main changes we need, plus the bonus change to be added in future (last point about tagging users too).

Adding feature comments

  • Currently when we review a submission on the submission details page we create a new comment with uuid:2b684e90-2673-47c8-8dbc-2083031709e5-SUBMISSION_INST appended.
  • I would propose we change this to:
    • #submissionId:uuid:2b684e90-2673-47c8-8dbc-2083031709e5 #featureId:313452711 @spwoodcock the comment goes here
    • #submissionId: the ODK submission id
    • #featureId: the osm_id field from the geometry, what we display to the user identifying the feature
    • @spwoodcock: optional tag for a specific user to see the comment
    • So we have the submissionId and featureId (extracted from feature osm_id field) attached to the comment.
    • These fields get matched on the frontend, and the tags are filtered out from the final comment displayed.
    • We probably need to keep the logic matching uuid:2b684e90-2673-47c8-8dbc-2083031709e5-SUBMISSION_INST too so old projects work for now (add a comment to clarify this in the code)

Viewing comments for specific features

As @manjitapandey shows in this image, we can filter the task comments by the featureId shown at the top of the popup:

Image

The comment could be displayed in the popup as down.

Viewing comments for specific submissions

We already have this functionality where the comments are filtered out from the task comments:

Image

Just the tags to filter by will be adjusted slightly

Viewing comments for specific users (notifications)

  • I think we should add this in the future, depending on priorities, but it's not a huge change.
  • Extract out the @spwoodcock tag from the comments.
  • If a new comments is added on the mapper frontend ShapeStream (from electric), we identify the tag.
  • If the username matches the current logged in username, we can add a popup notification in the center screen for the user.

Similar to how we show the most recent event to the user at the top right:

Image

Instead we display this in center screen, as the notification / comment is made.

(the only caveat here is that the user must be on the FMTM web page when the comment is made, for the notification to be displayed. As long as it's the most recent comment, we will notify the user. If a new comment is made after, then the user would no longer be notified)

@NSUWAL123
Copy link
Contributor

Comment tagging functionality is yet to be implemented!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Related to frontend code testing:ready Ready for testing
Projects
Status: In Progress
Development

No branches or pull requests

3 participants