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

Support for commenting functionality #592

Open
4 tasks
skrishn opened this issue Mar 12, 2024 · 8 comments
Open
4 tasks

Support for commenting functionality #592

skrishn opened this issue Mar 12, 2024 · 8 comments
Assignees
Labels
Reporter 4.x Crowdsource Reporter (new)
Milestone

Comments

@skrishn
Copy link
Collaborator

skrishn commented Mar 12, 2024

Let users add comments to the report if the layer has a related table. This is a config option. User will have to select a layer and select a text field to store the comments.

  • Allow for anonymous usage/comments - config option (add warning when no features exist)
  • Field picker option
  • Add an option to support images in the comments
  • Show the first five comments, and users will click a view more button to show the next 5.
@skrishn skrishn added the Reporter 4.x Crowdsource Reporter (new) label Mar 12, 2024
@skrishn skrishn added this to the 2024.R02 milestone Mar 12, 2024
@sumitzarkar
Copy link
Collaborator

sumitzarkar commented Mar 28, 2024

@skrishn

  • As discussed on the call, While adding new comments we will always show a Feature form to enter details
  • If the user wants to show only one field in the form the feature form on the layer should be configured accordingly.
  • To support this functionality we can make use of FeatureForm in 4.x and directly use the editor widget to add the comments.
  • Also, as discussed on the call we will just support commenting on only one related table(the first one if the layer have multiple tables)
    Please confirm.

Select a layer and select a text field to store the comments

  • Previously we used to select a single field for commenting for the whole application, now we will choose a comment field for individual related table layers - Please confirm if our understanding is correct.
  • This selected field will only be used to show the comments in the list
    image

Add an option to support images in the comments

  • Will this option be configurable or do we need to support attachment if the table hasAttachments
  • If we are using Editor widget this will be handled easily
  • We are allowing users to submit the images in the comments but we are not showing them in the comments list. Please confirm.

  • Comment order - by default comments will follow the same order as reports i.e. reverse order of Object ID.
  • Also similar to the report submission message we also need comments successful submission message and error message

Show the first five comments, and users will click a view more button to show the next 5.

  • According to Figma mockups we see only the option to load all the comments.
  • Initially, we will show only 5 and then the remaining all comments
    Please confirm

  • We see one problem in the comment UI
  • As per mockups we need to show the comment button at the bottom of the feature details screen. However, when we have multiple features we show the features navigation button(next/prev) at the bottom
  • Maybe we need to modify the feature details UI to show the navigation buttons at the top, please check and let us know
  • Note: Also as per the Manager Ticket the UI for the next prev button is going to be changed Show a list of selected records for navigation #417 (comment)
Existing UI Updated UI
image image

@skrishn
Copy link
Collaborator Author

skrishn commented Mar 28, 2024

@sumitzarkar

  • Previously we used to select a single field for commenting for the whole application, now we will choose a comment field for individual related table layers
  •  Yes field for storing comment is configured through app config, but we would like to show the the feature form as in the webmap.
    
  • This selected field will only be used to show the comments in the list -
  • It makes sense to show the full feature form not just the comment field, but I'll confirm.
    
  •  Support if layer hasAttachments
    
  •  Show images in comments
    
  • Also similar to the report submission message we also need comments successful submission message and error message:
  •  Will update you next week on this.
    
  • Show the first five comments, and users will click a view more button to show the next 5:
  •   Your understanding is correct
    
  •   Comment UI - Pagination would look like in the UI and comment button in the button as in the Updated UI?
    

@skrishn
Copy link
Collaborator Author

skrishn commented Apr 1, 2024

@sumitzarkar I talked with Chris, and here are a few additional details on the commenting functionality. Please let me know if you've any questions.

We'd like to show the configured pop-up. Although it can take up a lot of space, what if we show it so it is similar to the list of reports, where you see the pop-up title of the comment and then you can select it to view the full pop-up. Also w/ regard to this, config option in the app to select a comment field doesn't makes sense anymore, so I will request the designer to remove it. If commenting is enabled, and it would need to check that the layer has a related table and that the related table is in the map.

Strings to use after submission: "Comment submitted" and "Comment not submitted."

@sumitzarkar
Copy link
Collaborator

@skrishn

We will check the feasibility and let you know.

@skrishn
Copy link
Collaborator Author

skrishn commented Apr 4, 2024

From sumit

"Regarding comment functionality, you mentioned about showing logged in user images.
of showing list of comments using popup title we will not have this option, please confirm

image

when we get any feature we just get created by info, we are not sure if we will be able to get images for each user. using Arcgis portal api we can get details of the loggedin user in which we can get the loggedin users image but not sure about getting images of the users using just the username.

It would be helpful if we get any thoughts of API team on this"

@sumitzarkar I'm waiting to hear from the API team

@chris-fox
Copy link
Collaborator

@sumitzarkar, from our discussion on the call here is a screenshot of a pop-up I configured for related comments in manager. I like to show the full comment in the title so you don't have to click into each to view the comment so handling the multiline text is important in this scenario.

image

@prachichawande-ct
Copy link
Collaborator

@skrishn

Dev Checklist

Items Is required Status Comments
Required NLS changes? Yes
Required Backward compatibility No
Required 508 Yes
Need Sanitize? No

Impact Analysis Report

Impacted Areas Comments
Have Configuration changes? No
Have Runtime changes? Yes
Impact on RTL Yes
Impact on feature details panel If the comment option is enabled in the config and the related table is present in the map then comment functionality should work as follows:
  • Comment icon should be displayed with present comments counts below the feature details and beside the like and dislike buttons
  • Comment list should be shown below the comment, like and dislike buttons
  • If comments count is more than five then pagination should be displayed below the comments list
  • Comment button should be shown below the feature list to add the new comments
image
Comment Functionality
  • On clicking an individual comment from the comment list, the comment details panel should be displayed
  • On click of the comment button, the comment form should be displayed with fields from the related table
  • After filling mandatory fields and clicking the submit button
    • If form submitted successfully then
      • The success message should be displayed
      • The feature-details panel should be displayed with the updated comments
    • If form submission failed then failed message should be displayed

sumitzarkar added a commit that referenced this issue May 17, 2024
-  Updated code to support sorting of the features list - #606
- Updated features list to reuse for comment list - #592
sumitzarkar added a commit that referenced this issue May 17, 2024
- #592
- Updated feature details for comment functionality
sumitzarkar added a commit that referenced this issue May 17, 2024
- Added support for sorting features list
- Added Support for comment functionality
- #592
- #606
- #630
sumitzarkar added a commit that referenced this issue May 20, 2024
## Implemented
- Code review comments from previous pull request
- Fixed minor testing issues
- #592
- #606
- #630
@skrishn
Copy link
Collaborator Author

skrishn commented May 29, 2024

@sumitzarkar I noticed that the comment popup displays all the fields instead of honoring the ones that are configured in popup. Once a comment is submitted, it displays only the configured fields in the popup.

https://crowdsource.mapsqa.arcgis.com/apps/instant/reporter/index.html?appid=fd3796ced02d483d9fa6b6a39971a44f

image

Map https://crowdsource.mapsqa.arcgis.com/apps/mapviewer/index.html?webmap=47df7cc3aa46499aa2c51c2b627ceae7
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reporter 4.x Crowdsource Reporter (new)
Projects
None yet
Development

No branches or pull requests

4 participants