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

SwG module should accept non-domain Publication IDs #4025

Closed
ChrisAntaki opened this issue Sep 13, 2021 · 4 comments
Closed

SwG module should accept non-domain Publication IDs #4025

ChrisAntaki opened this issue Sep 13, 2021 · 4 comments
Labels
Module: Subscribe with Google Subscribe with Google module related issues P1 Medium priority Type: Bug Something isn't working
Milestone

Comments

@ChrisAntaki
Copy link
Contributor

ChrisAntaki commented Sep 13, 2021

Bug Description

The SwG module currently rejects non-domain Publication IDs. This is an issue, because Publisher Center will generate randomized non-domain Publication IDs

Steps to reproduce

  1. Go to the SwG module setup or settings page
  2. Enter a Publication ID like "Test"
  3. See validation error

Screenshots

image


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • It should be possible to submit the Subscribe with Google module setup and settings form when entering a publication ID that is not a domain. A "random" alphanumeric character combination should be allowed too.

Implementation Brief

Test Coverage

Visual Regression Changes

QA Brief

  • Enable the swgModule feature flag with the tester plugin
  • Click "Set up Subscribe with Google" on the Settings > Connect More Services page
  • Fill out the form
    • The Publication ID field expects a string. The string can contain letters, numbers, underscores (_), periods (.), and dashes (-)

Changelog entry

  • Fix validation for Subscribe with Google publication ID so that it allows non-domain input.
@ChrisAntaki ChrisAntaki added Module: Subscribe with Google Subscribe with Google module related issues Type: Bug Something isn't working labels Sep 13, 2021
@ChrisAntaki ChrisAntaki self-assigned this Sep 13, 2021
@felixarntz felixarntz added the P1 Medium priority label Sep 13, 2021
@felixarntz felixarntz added this to the Sprint 58 milestone Sep 13, 2021
@felixarntz
Copy link
Member

@ChrisAntaki IB ✅

Two general recommendations though for the future:

  • Here it's trivial enough, but typically it's better to not start the PR before getting an IB through. Instead you could have said something like "...so that it doesn't require ending in .[a-z]" in the IB.
  • Preferably write the IB as a set of instructions. E.g. "Change a RegEx..." instead of "I'll change a RegEx...".

@felixarntz
Copy link
Member

@ChrisAntaki Can you please add a QA Brief to the issue?

@felixarntz felixarntz assigned ChrisAntaki and unassigned felixarntz Sep 14, 2021
@ChrisAntaki
Copy link
Contributor Author

Yep, just added a QA brief 👍

@wpdarren
Copy link
Collaborator

wpdarren commented Sep 17, 2021

QA Update: ✅

Verified:

  • When the Publication ID field is populated, I am able to enter a string that contains letters, numbers, underscores periods, and dashes. When any other characters are entered, the input field border turns red.
  • The same applies when I go into the Settings > Subscribe with Google and edit the fields.

image

@ChrisAntaki @felixarntz there are two observations outside of the scope of this ticket, and I might be jumping ahead of myself, but wanted to ask:

  1. The Products field doesn't have any validation, in that you can enter any characters. You are also unable to leave any spaces, is that expected? I also noticed that there is no limit with the number of characters you can include in this field too.

  2. On the Publication ID field, when you enter a character not allowed like & or $ there is no message to help the user understand what they have done wrong. Usually, we have a message notifying them.

@wpdarren wpdarren removed their assignment Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Subscribe with Google Subscribe with Google module related issues P1 Medium priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants