Skip to content

Conversation

@adlius
Copy link
Contributor

@adlius adlius commented Mar 19, 2019

Purpose

Add campaign query parameter to register view's url.

QA Notes

campaign=osf-registries should appear in the url when you sign up through registries landing page.

Ticket

https://openscience.atlassian.net/browse/EMB-610

Reviewer Checklist

  • meets requirements
  • easy to understand
  • DRY
  • testable and includes test(s)
  • changes described in CHANGELOG.md

@coveralls
Copy link

coveralls commented Mar 19, 2019

Pull Request Test Coverage Report for Build 2790

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 70.907%

Files with Coverage Reduction New Missed Lines %
lib/osf-components/addon/components/osf-navbar/auth-dropdown/component.ts 3 81.97%
Totals Coverage Status
Change from base Build 2785: -0.02%
Covered Lines: 5797
Relevant Lines: 7369

💛 - Coveralls

@computed('signUpURL', 'signUpNext')
get signUpRoute() {
return this.features.isEnabled(featureFlagNames.routes.register) ? 'register' :
return this.features.isEnabled(featureFlagNames.routes.register) ? `register?${param(this.signUpQueryParams)}` :
Copy link
Contributor

Choose a reason for hiding this comment

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

While this fixes the immediate problem, a better solution would be deleting the signUpRoute computed prop entirely and replacing the @href here with @route='register':

For several reasons:

  • Would fix a bug I happened to find while testing this: Clicking "Sign up" on the registries discover page takes you to /registries/register (because href='register' is a relative URL), which 404s (verified on prod)
  • Using OsfLink's @route instead of @href avoids reloading the page when the emberized sign up page is waffled on
  • Feature flags are checked on every transition, so the check here is redundant

Looks like signUpURL is never used, so that should be a safe change (and signUpURL could be deleted too).

aaxelb
aaxelb previously approved these changes Apr 17, 2019
@jamescdavis jamescdavis merged commit cc4329e into CenterForOpenScience:develop Apr 18, 2019
@jamescdavis jamescdavis added this to the 19.3.0 milestone Apr 18, 2019
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.

4 participants