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

Feature: TOS #4699

Merged
merged 211 commits into from Feb 20, 2024
Merged

Feature: TOS #4699

merged 211 commits into from Feb 20, 2024

Conversation

magicznyleszek
Copy link
Member

@magicznyleszek magicznyleszek commented Oct 24, 2023

This is a feature PR - it gathers reviewed and tested code in a single PR. We do smaller branches that are based in feature/tos branch.

Description

Adds new fields to the signup and user profile settings, and a modal for existing users to confirm their acceptance of the Terms of Service and Privacy Policy.

Details

Overview of changes

  • "Terms of Service" modal (📜 notion card)
    • In-app "Terms of Service" modal for existing users
      • Show modal with a server message, meant to include a way to read the latest Terms of Service
      • Show required fields and allow user to fill in or correct them.
  • New fields on signup and profile (👤 notion card)
    • in Signup form…
      • Organization Type (a new dropdown field)
      • Organization Website field, shown during signup, if relevant
      • A newsletter opt-in checkbox
      • A checkbox for accepting the Terms of Service and Privacy Policy
    • in Profile (Account settings), new Organization Type dropdown and Newsletter checkbox

Development notes

Related PR's

About 'Organization Type' skip logic

The 'Organization Type' field has a few different options, the last of which is "I am not associated with an organization". In the codebase, we call this { "organization_type": "none" }

If the "Organization Type" is "none", then we don't need to collect a name and website. So we can hide these fields sometimes when they're not relevant. In the codebase, we call this "Skip logic", to match terminology of the same feature in Form Builder.)

magicznyleszek and others added 30 commits October 19, 2023 16:13
and use it with InvalidatedPassword
# Conflicts:
#	jsapp/js/components/permissions/permValidator.es6
#	jsapp/js/components/permissions/sharingForm.es6
#	jsapp/js/utils.ts
- Add dropdown choices for organization_type
- Add placeholder for email
- Add organization_website to sign-up form
- Make organization_website and organization_type removable
  from signup page via Constance USER_METADATA_FIELDS
- Update 'Organization' label to 'Organization name'
- Update CSS layout and field order to match designs
…reement-screen

[TASK-111] Prepare TOS Agreement screen
# Conflicts:
#	jsapp/js/account/accountSettingsRoute.tsx
p2edwards and others added 22 commits January 30, 2024 11:58
- TS dislikes {behavior: 'instant'}, suggests defaulting to auto
microsoft/TypeScript#46654 (comment)
- TS config abhors unused parameter
…from `KobocatDeploymentBackend` and `MockDeploymentBackend` into
`BaseDeploymentBackend`
…backend-code

Consolidate common deployment backend code
- infer 'http', not 'https', to reduce risk of broken links

- allow and normalize single-slash and no-slash in protocol, e.g.
  http:/example.test, http:example.test => http://example.test/

- normalize trailing slash on URLs.
     e.g., https://example.test => https://example.test/

  This is a biproduct of using built-in URL() method to normalize.
  If we don't want this, we could instead normalize protocol '://' with:

    value = value.replace(
      /(^https?)(:\/?\/?)(.*)/,
      (str,protocol,sep,rest) => protocol + '://' + rest
    );
For a succinct alternative: Mark the outline rule as !important;
…with an idea for achieving this with less JS and more CSS.
Improve appearance of Signup and User Profile fields
Keyboard-accessible Select component for TOS/Accounts
…and it otherwise looks quite weird.

Improvements that could be made to this, but are not a priority at the
moment:

1. Gridlike alignment of fields when there's long labels or error labels
2. Or put the field on its own row only when it shows an error
… The rest of the fields in the two-column layout have a submit-blocking
frontend validation that is at least as strict as what the backend would
reject, so the layout-shifting red error text is only relevant for email
and username.

(or extra long label translations. but the layout shifting is already
slightly more optimized for that case.)
@p2edwards p2edwards changed the base branch from release/2.024.05 to beta February 15, 2024 18:27
@p2edwards p2edwards merged commit 9cebef7 into beta Feb 20, 2024
4 checks passed
@p2edwards p2edwards deleted the feature/tos branch February 20, 2024 20:25
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.

None yet

9 participants