-
Notifications
You must be signed in to change notification settings - Fork 49
chore: remove support link references #7112
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
base: master
Are you sure you want to change the base?
Conversation
wdoconnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, and thanks for tackling this.
I left more detailed comments as a guide, but in general, the main changes I would make here are:
- Omit the hardcoded hrefs to an empty ( # ) in the
<a>elements, and update thee2etest to assert on the onClick handler behavior instead (that it opens the modal). - Change the "Submit" buttons to be more reflective of what they do, which is just to open a modal to create a request. "Create Request" seems appropriate.
- I would see if we can test the updated sfdc API requests locally to ensure the data populates properly. (Let me know if helpful to pair on this.)
| showOverlay( | ||
| 'contact-support', | ||
| { | ||
| subject: `[Org: ${orgName}] [Org Id: ${orgID}] Request Series Cardinality Limit Increase`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| size={ComponentSize.Medium} | ||
| color={ComponentColor.Primary} | ||
| className="rate-alert--request-increase-button" | ||
| text="Submit Request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handleSubmit function no longer submits the form but opens a popup. Could we change the text to suit the fact that this button just opens the "Contact Support" menu with the appropriate props rather than submitting the request?
How about "Create Request."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| size={ComponentSize.Medium} | ||
| color={ComponentColor.Primary} | ||
| className="rate-alert--request-increase-button" | ||
| text="Submit Request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here re: "Submit Request" since this just opens an overlay. I think "Create Request" may be better since it just opens a modal to prepare the contact-support request, and that modal has its own Submit button.
|
|
||
| export const RATE_LIMIT_ERROR_TEXT = | ||
| 'Oops. It looks like you have exceeded the query limits allowed as part of your plan. If you would like to increase your query limits, reach out at support.influxdata.com.' | ||
| 'Oops. It looks like you have exceeded the query limits allowed as part of your plan. If you would like to increase your query limits, please use the Contact Support option in the Help menu.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| const tooltipContent = ( | ||
| <p> | ||
| Organizations can be reactivated within 7 days of deletion. Please{' '} | ||
| <a href="#" onClick={handleContactSupport}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current solution in this PR changes the application code to 'fix' a test, which should not be done -- we should update the e2e test to expect behaviors consistent with the way the app behaves.
The app now results in opening the contact support modal on click. So the e2e test, instead of looking for an href tag with an empty internal anchor ( # ), should expect that, when this element is clicked, the Contact Support overlay opens.
You probably don't need to supply the href attribute at all (unless the linter is requiring it). Per MDN, the href element is optional:
Content within each should indicate the link's destination. If the href attribute is present, pressing the enter key while focused on the element will activate it.
Using a <Link> Component could also be appropriate here.
src/shared/components/NotFound.tsx
Outdated
| <span> | ||
| The webpage you were trying to reach may have been removed | ||
| or your access to this page may have expired. Please{' '} | ||
| <a href="#" onClick={handleContactSupport}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here: I think if we use an actual Link element with can avoid setting the href to '#'.
| support.influxdata.com{' '} | ||
| </SafeBlankLink> | ||
| For more resources, you can{' '} | ||
| <a href="#" onClick={handleContactSupport}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment re: not hardcoding '#' elements
| '4 - Request', | ||
| ] | ||
| const isContractOrPAYG = | ||
| accountType === 'contract' || accountType === 'pay_as_you_go' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| testID="contact-support-subject-input" | ||
| /> | ||
| </Form.Element> | ||
| <Form.Element label="Severity" required={true} labelAddOn={severityTip}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spacing on this looks odd, might want to run prettier on this.
cypress/e2e/cloud/org-list.test.ts
Outdated
| cy.get('a') | ||
| .contains('https://support.influxdata.com/s/login') | ||
| .should('have.attr', 'href', 'https://support.influxdata.com/s/login') | ||
| cy.get('a').contains('contact support').should('have.attr', 'href', '#') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See later comments -- We should update this test to check the onClick behavior, not for the presence of the href attribute.
| cy.get('a') | ||
| .contains('https://support.influxdata.com/s/login') | ||
| .should('have.attr', 'href', 'https://support.influxdata.com/s/login') | ||
| cy.get('button').contains('contact support').should('exist') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@wdoconnell I opted to use |


Addresses https://github.com/influxdata/EAR/issues/6468.
Follow-on branch to #7106 to trigger a new CI run to pull updates to
monitor-ci-tests.Checklist
Authors and Reviewer(s), please verify the following: