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

feat: Drop old inaccuracy reports, add new feedback category #2801

Merged
merged 7 commits into from
Mar 27, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Feb 16, 2024

What does this PR do?

What's not in the PR?

Next steps

If approved, I'll update the testing notes for the feedback tool once merged.

image

Comment on lines +254 to +259
<FeedbackOption
onClick={() => handleFeedbackViewClick("inaccuracy")}
Icon={RuleIcon}
label="Inaccuracy"
showArrow
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could conditionally display this if the node type matches the previous places we used to show this option, but that seems a little inconsistent for users potentially? I've opted against it here to very much open to thoughts.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is right - easy to imagine someone wanting to report "inaccurate" help text, etc 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep - agreed!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's a very good point about the consistency although I think 4 options is quite a lot to choose from and maybe makes it a little overwhelming for users?

Rather than rendering it conditionally in the triage the "Report an inaccuracy" could potentially be directly opened the same way that "Report an issue with this page" does?

So rather than select "feedback" link in the footer text they see the "inaccuracy" link and it renders this form? I don't think it would be too jarring as it's the same style and it would also scope inaccuracy reports to the places we were recording it before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey sorry for the very slow response here! Kept on de-prioritising this one.

I think in this instance I'm in favour of keeping the fourth option everywhere, over conditionally showing a form in certain places.

The main motivation behind this is that we can't necessarily know which places may contain inaccurate data.

I'll make sure though that this issue is explicitly raised at PO testing just so we have another pair of eyes on this.

@DafyddLlyr
Copy link
Contributor Author

Copy link

github-actions bot commented Feb 16, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr force-pushed the dp/feedback-inaccuracy branch 4 times, most recently from f696801 to f66e4bd Compare February 16, 2024 11:27
@DafyddLlyr DafyddLlyr marked this pull request as ready for review February 16, 2024 12:01
Copy link
Contributor

@Mike-Heneghan Mike-Heneghan left a comment

Choose a reason for hiding this comment

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

Quick comment about a potential wee UI trap.

Comment on lines +254 to +259
<FeedbackOption
onClick={() => handleFeedbackViewClick("inaccuracy")}
Icon={RuleIcon}
label="Inaccuracy"
showArrow
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's a very good point about the consistency although I think 4 options is quite a lot to choose from and maybe makes it a little overwhelming for users?

Rather than rendering it conditionally in the triage the "Report an inaccuracy" could potentially be directly opened the same way that "Report an issue with this page" does?

So rather than select "feedback" link in the footer text they see the "inaccuracy" link and it renders this form? I don't think it would be too jarring as it's the same style and it would also scope inaccuracy reports to the places we were recording it before?

@DafyddLlyr DafyddLlyr force-pushed the dp/feedback-inaccuracy branch from 1dd9e3b to ffa8c48 Compare March 27, 2024 10:17
@Mike-Heneghan
Copy link
Contributor

Mike-Heneghan commented Mar 27, 2024

I just noticed that on a successful submit of an inaccuracy report the UI doesn't update to the "thanks for feedback"

Update: I just realised there was an error rather than the submit being successful:

{
    "errors": [
        {
            "message": "expected one of the values ['comment', 'helpful', 'idea', 'issue', 'unhelpful'] for type 'feedback_type_enum_enum', but found 'inaccuracy'",
            "extensions": {
                "path": "$.selectionSet.insert_feedback.args.objects[0].feedback_type",
                "code": "validation-failed"
            }
        }
    ]
}

I have the migration to add the new type but maybe something is out of sync, I'll test again on the pizza rather than locally.

Screen.Recording.2024-03-27.at.11.27.25.mov

@DafyddLlyr
Copy link
Contributor Author

Thanks @Mike-Heneghan - taking a look just now!

Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

It would be ace to get some tests for the new option if you have the chance.

Copy link
Contributor Author

@DafyddLlyr DafyddLlyr Mar 27, 2024

Choose a reason for hiding this comment

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

Good spot thanks! See 76040f8

I think this was initially missed as there was a ticket for tests still in "To do this sprint" when I opened the PR 😅

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahahahaha yeah it did take me a while to get the testing setup 😅

It would also be good to get an accompanying accessibility test along the lines of

  test("Inaccuracy form should have no accessibility violations", async () => {
    const { container, getByText, getByRole, user } = setup(<Feedback />);

    await user.click(getByText("feedback"));

    await waitFor(() => {
      expect(getByRole("button", { name: "Inaccuracy" })).toBeInTheDocument();
    });

    await user.click(getByRole("button", { name: "Inaccuracy" }));

    await waitFor(() => {
      expect(getByText("Report an inaccuracy")).toBeInTheDocument();
    });

    const results = await axe(container);
    expect(results).toHaveNoViolations();
  });

Not that these tests have been particularly useful when it came to the accessibility report 😓

@DafyddLlyr
Copy link
Contributor Author

I just noticed that on a successful submit of an inaccuracy report the UI doesn't update to the "thanks for feedback"

Screen.Recording.2024-03-27.at.11.27.25.mov

I can't recreate this locally or on the Pizza. Which environment was this recording taken in?

@Mike-Heneghan
Copy link
Contributor

Mike-Heneghan commented Mar 27, 2024

Thanks @Mike-Heneghan - taking a look just now!

I just retested on the pizza and it was a local issue for me. Sorry for the false alarm!

I ran the migration in the CLI but I think that wasn't picked up by Hasura for the mutation.

When I reloaded the metadata for feedback_type_enum in Hasura the error was resolved 🥳

Copy link
Contributor

@Mike-Heneghan Mike-Heneghan left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@DafyddLlyr DafyddLlyr merged commit c7e7259 into main Mar 27, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/feedback-inaccuracy branch March 27, 2024 12:01
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.

3 participants