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

New feature stays highlighted when a language is switched in reporter app #850

Open
skrishn opened this issue Sep 9, 2024 · 3 comments
Open
Assignees
Labels
1-BUG Something isn't working Reporter 4.x Crowdsource Reporter (new)
Milestone

Comments

@skrishn
Copy link
Collaborator

skrishn commented Sep 9, 2024

I configured a new reporter app with the language switcher option.

  1. Create a new report
  2. Add a feature
  3. Change the language
  4. Panel reloads and goes back to the layer list, which is expected.
  5. The feature created in step 2 is still there and stays highlighted.
  6. It's still highlighted even after creating another report

https://localgovdev.mapsdevext.arcgis.com/apps/instant/reporter/index.html?appid=c51914bdd9974e1cba2cb1bd1c5dec07

image

LS new feature issue

@skrishn skrishn added 1-BUG Something isn't working Reporter 4.x Crowdsource Reporter (new) labels Sep 9, 2024
@skrishn skrishn added this to the 2024.R03 milestone Sep 9, 2024
@sumitzarkar
Copy link
Collaborator

@skrishn @jmhauck

Cause

  • We have not considered this case for the reporter component.
  • In this case, when the language is changed the Reporter component is reloaded from the instant app.
  • If the user is in the create feature workflow then the editor widget is not getting destroyed.

Solution

  • To avoid this issue we can destroy the editor widget instance in the create-feature component's disconnectedCallback lifecycle method.
  • This will make sure if the editor is created it will be destroyed and any graphics drawn/highlighted will be removed
 /**
   * StencilJS: Called every time the component is disconnected from the DOM,
   */
  disconnectedCallback(): void {
    if (this._editor) {
      this._editor.destroy();
    }
  }

@jmhauck - please let us know your thoughts on this

@jmhauck
Copy link
Collaborator

jmhauck commented Sep 26, 2024

@sumitzarkar this sounds like a reasonable approach

@pratiksabale07
Copy link
Collaborator

@skrishn @jmhauck

Cause


Solution


Dev Checklist

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

Impact Analysis Report

Impacted Areas Comments
Have Configuration changes? No
Have Runtime changes? Yes
Impact on RTL No
Impact on runtime The feature and its highlight should be removed when a language is switched in the reporter app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-BUG Something isn't working Reporter 4.x Crowdsource Reporter (new)
Projects
None yet
Development

No branches or pull requests

4 participants