Commit graph

7539 commits

Author SHA1 Message Date
M Fahru
5065bb78ea Merge pull request #19904 from overleaf/ds-plans-page-new-design-adding-geo-banners
Plans page new design - Implement geo banner for India and latin america users

GitOrigin-RevId: 4b0ca2e6e290672c5ae1f41cde904a4d48197a33
2024-08-15 08:05:58 +00:00
M Fahru
87e3459563 Fix aria-hidden attribute by adding explicit "true" to its value
GitOrigin-RevId: 173f2e2d18a993ee81506d420b120231e4f40574
2024-08-15 08:04:52 +00:00
Antoine Clausse
8e68f10523 [web] In _deleteV1Account: Add response?.statusCode optional chaining, await request before getting response (#19936)
* Add optional chaining in `response.statusCode` in `_deleteV1Account` error handling

Should fix https://overleaf.sentry.io/issues/5708988236/

* Add another `response?.statusCode`

* Await `V1Api.promises.request` before getting the response

GitOrigin-RevId: 52a156680845516357b11943bee8c33a5a023514
2024-08-15 08:04:44 +00:00
andrew rumble
019562cb5a Update promises to use async functions directly
GitOrigin-RevId: f6a5d235ee259a4cf00f1e8d5c089b2d1d24a842
2024-08-15 08:04:39 +00:00
andrew rumble
7af4980a4d Promisify ProjectEntityUpdateHandler functions
Promisify wrapWithLock

Promisify getDocContext

Promisify updateDocLines

Promisify setRootDoc

Promisify unsetRootDoc

Promisify addDoc and addDocWithRanges

Promisify addFile

Promisify upsertFile

Promisify upsertDocWithPath

Promisify deleteEntity

Promisify deleteEntityWithPath

Promisify mkdirp and mkdirpWithExactCase

Promisify moveEntity

Promisify renameEntity

Promisify addFolder

Promisify convertDocToFile

Promisify resyncProjectHistory

Promisify _addDocAndSendToTpds

Promisify _replaceFile

Promisify _checkFiletree

Promisify _cleanupEntity

Promisify _updateProjectStructureWithDeletedEntity

Promisify _cleanUpDoc and _cleanUpFile

Promisify upsertFileWithPath

Promisify upsertDoc

Promisify _uploadFile

Promisify _addFileAndSendToTpds

GitOrigin-RevId: 56a7de0ae79efedd5ad48abae2db22a4028c0c12
2024-08-15 08:04:30 +00:00
andrew rumble
c4d7da87a6 Move functions to be promisified
Moving these first will make later commits have a cleaner diff. There
are no substantive code changes in the moved functions.

GitOrigin-RevId: 06e0c5bb02f300942c8fbe80e81484c4d717dbc9
2024-08-15 08:04:25 +00:00
Alexandre Bourdin
10ef61a02b Merge pull request #19901 from overleaf/ac-confirm-institution-domain-queue-in-institution-module
[web] Add `start` function to modules. Move `confirm-institution-domain` queue to institution module

GitOrigin-RevId: 0d36ff3dcc529e77c76d72d0a67bbdb9310b42fd
2024-08-14 08:05:39 +00:00
Alexandre Bourdin
61891e3c80 Merge pull request #19861 from overleaf/ab-overleaf-integration-delete-flow
[web] Remove /user/delete override from overleaf-integration

GitOrigin-RevId: 4f679f6835522c2325fe7b0368f58e7a952ee73d
2024-08-14 08:05:30 +00:00
Brian Gough
cf83990459 add tests for unwanted 500 responses from invalid urls (#19612)
* add acceptance tests for bad urls

* fix 500 from health check when smoke test userId is undefined

* handle exception from invalid urls in ExpressLocals middleware

* Add return statement before `next()`

* Cleaned up list of crash_test_urls.txt

* Return 400 instead of 404 on parsing errors

---------

Co-authored-by: mserranom <mserranom@gmail.com>
GitOrigin-RevId: dac35b07d1f12bd9ceb70e3064ec2ef8393f99b5
2024-08-14 08:05:16 +00:00
Davinder Singh
90c32aacee Merge pull request #19869 from overleaf/mf-plans-faq-button-use-material-symbols
[web] Use material symbols on plans FAQ's button

GitOrigin-RevId: 934f3627027a297fa39a835c98ff337f2a93d1d1
2024-08-14 08:04:46 +00:00
Antoine Clausse
fb114a7c44 Merge pull request #19545 from overleaf/ac-remove-login-route-override
[web] Remove `/login` route override from overleaf-integration

GitOrigin-RevId: a22d0698e5039a8e77fb7ebb620500ad40a9a630
2024-08-14 08:04:26 +00:00
Jessica Lawshe
c636089939 Merge pull request #19822 from overleaf/jel-plans-notifications
[web] Show geo banners on light touch redesign of plans page

GitOrigin-RevId: 08ee6827cc16ec9326e5dbb1a165602be9cfe86d
2024-08-13 08:04:38 +00:00
Jessica Lawshe
47ad169781 Merge pull request #19758 from overleaf/jel-modal-light-touch
[web] Update group modal on plans page light touch redesign

GitOrigin-RevId: 26cce2996bed263c46d06b1b1fced8206fc9d8c1
2024-08-13 08:04:33 +00:00
Jessica Lawshe
214f093eb7 Merge pull request #19749 from overleaf/jel-fix-first-feature-row-border
[web] Fix first feature row border radius on light touch plans redesign

GitOrigin-RevId: 2ef5b1cbb13284a95d6c5d9370cd003f4ccf7f48
2024-08-13 08:04:29 +00:00
Jessica Lawshe
c4c36c9cea Merge pull request #19725 from overleaf/jel-interstitial-page-light-touch
[web] Interstitial payment page for light touch redesign

GitOrigin-RevId: ff83df760dd552d001ad8815f0a34cae5e13e6ff
2024-08-13 08:04:25 +00:00
Antoine Clausse
8736bee460 [web] Move confirm_university_domain to institutions module, and /api/clsi/compile/* to publish-modal module (#19797)
* Move `/api/institutions/confirm_university_domain` to institutions module

* Move `confirmDomain` to institutions module

* Move `/api/clsi/compile/*` endpoints to `publish-modal` module

* Move ApiClsiTests to publish-modal module

* Revert move of MockClsiApi. It's still needed in the main acceptance tests

GitOrigin-RevId: b59c2921e03b94546d72d21e60a688eb1ae1d05e
2024-08-12 08:05:16 +00:00
ilkin-overleaf
16cdf5140a Merge pull request #19626 from overleaf/ii-invite-remove-unncecessary-fields
[web] Clean up props exposed to the /invite and /invites endpoints

GitOrigin-RevId: dc4163e04d5785e141d5e322bfb0a626e67d637f
2024-08-12 08:05:04 +00:00
Rebeka Dekany
57b3871c1c Merge pull request #19823 from overleaf/rd-navbar-pug-a11y
[web] Announce buttons as menu items in the navigation bar and allow tabbing within the menu

GitOrigin-RevId: 138fef3369bf5c89487e673ab42c06b7c13bcf48
2024-08-12 08:04:54 +00:00
Alexandre Bourdin
972fbb7c67 Merge pull request #19818 from overleaf/ab-fix-split-test-archived-notification-comment
[web] Skip sending last versions comment with archived test notification

GitOrigin-RevId: 997111220161eaf7588cac8809024ac4a09bc037
2024-08-09 08:04:38 +00:00
M Fahru
b1cfb00e30 Merge pull request #19760 from overleaf/mf-more-than-50-group-member-picker
[web] Create group member picker footer with a link that opens contact sales modal on new plans page

GitOrigin-RevId: 1dc1dce726cc0222bbbef911a016f1eb6a881aeb
2024-08-09 08:04:34 +00:00
Thomas
a16db120c0 Implement free trial limits (#19507)
* Add additional validations for subscription trials

GitOrigin-RevId: 1cb821c62e02d3eaa5b2bcacaee63b6bc7a63311
2024-08-08 08:05:05 +00:00
Alf Eaton
049f8af680 Merge pull request #19684 from overleaf/ae-members-list
Allow all collaborators to access the project `members` endpoint

GitOrigin-RevId: 2e5911146c61f368f85e6b57a9c5f12a35e7b294
2024-08-07 08:05:45 +00:00
Thomas
2ee528a9d2 Merge pull request #19814 from overleaf/tm-link-sharing-project-joined-event-for-treatment
Add project-joined event when adding as Editor via link sharing

GitOrigin-RevId: 40f538376b90a45877859be9e48a0b4c45c9641d
2024-08-07 08:05:12 +00:00
Antoine Clausse
a278e70b27 [web] Fix UpgradePrompt in Editor - Retrieve isMember from userIsMemberOfGroupSubscription (#19810)
* Fix: Retrieve `isMember` from `userIsMemberOfGroupSubscription`

* Inline `userIsMemberOfGroupSubscription` call

GitOrigin-RevId: b8b339bbce3934b0b83bf6d805ab6ef6225d43e7
2024-08-07 08:05:03 +00:00
Jakob Ackermann
e26b6de51b Merge pull request #19740 from overleaf/jpa-linked-file-metadata
[misc] persist linkedFileData in full project history as file metadata

GitOrigin-RevId: f3e8ba947ea34b6796e210a076a248c57188d148
2024-08-06 08:04:44 +00:00
Jakob Ackermann
e85045255c Merge pull request #19644 from overleaf/jpa-remove-window-attributes
[web] goodbye window attributes

GitOrigin-RevId: b15a2cb1d96b657385c4d46dcf80e0269dbd7409
2024-08-06 08:04:39 +00:00
Alf Eaton
0f2aaa6c0c Merge pull request #19668 from overleaf/jpa-file-not-found-404
[web] entity not found when downloading file yields 404

GitOrigin-RevId: e6a2a7cf60f717fae53a42f39efb65f1624f71bb
2024-08-05 08:04:08 +00:00
Domagoj Kriskovic
55d0f51279 [web] Add split test for defaulting LaTeX beginners to visual mode (#19745)
GitOrigin-RevId: 4dff08f0f7f413ba3cdacbe46cf7493eca47657d
2024-08-02 08:05:15 +00:00
Domagoj Kriskovic
0766c91079 Default LaTeX beginners to the Visual Editor (#18917)
* open visual code if user havent used latex before

* test tooltip on code editor switch

* firstTimeLoadedEditor

* track editor.codeEditorOpened value

* lastEditorLoadedDate

* odc data loaded from mongo

* fix a typo

* use tutorial to check if it was dissmised

* use getInactiveTutorials fn

* fix test

* check if code editor was opened

* added translations

* pass classname to tooltip

* use signUpDate instead of lastEditorLoadedDate

* refactor visual fallback value

* use tutorial completed data only for tooltip

* set lastUsedMode in odc form

* safer usedLatex check

* getOnboardingDataValue helper function

* move tooltip to a separate component

* move classname to tooltipProps

* usedLatex in meta tag

* codeEdtiorOpened fallback value

* fix release date year

* fix 24 hours criteria for showing the tooltip

* fix tests

* hide tooltip when code editor is opened

* remove setting lastUsedMode in ODC form

* remove empty comment

* change date for checking signUpDate

* fix linting error

GitOrigin-RevId: 0a57ba3f4717492d4546633571117f667d3a05f8
2024-08-02 08:05:10 +00:00
Miguel Serrano
6721bbb356 Merge pull request #19676 from overleaf/msm-fix-email-support
[CE/SP] Fix email sending and support links

GitOrigin-RevId: faaaacd312d3ec4ccf90bfdefbb62d2701df5cfd
2024-08-01 08:06:16 +00:00
M Fahru
596dd87c5a Merge pull request #19611 from overleaf/ds-plans-page-faq-follow-up-finishing
Website redesign - Plans page FAQ section follow up adding modal

GitOrigin-RevId: fac7f0c676fa36e76842ec3f682d759ebcdbafbe
2024-08-01 08:05:49 +00:00
Jessica Lawshe
28c0ab80ad Merge pull request #19662 from overleaf/jel-light-touch-tabs
[web] Update plan tab buttons for light touch redesign

GitOrigin-RevId: 0ee3e7a9c277097abd32dcae2cc49a1a4b01e6f0
2024-08-01 08:05:37 +00:00
Jessica Lawshe
580111b984 Merge pull request #19638 from overleaf/jel-light-touch-payment-methods
[web] Update payment method section on the plans light touch redesign

GitOrigin-RevId: aa55b888b0d02e39cd907de4a675d61836d6aa01
2024-08-01 08:05:33 +00:00
andrew rumble
8af5fa0378 Upper-case for all methods
This is required by the fetch-api.

GitOrigin-RevId: 641c63ad2fe6b9d01c48c28faf669051de8f3271
2024-08-01 08:05:11 +00:00
andrew rumble
2477ac6c50 Upper case PUT for consistency
GitOrigin-RevId: e3ce6b652ee9cee8a719b56d0dddda2faf575968
2024-08-01 08:05:06 +00:00
andrew rumble
cbf8832908 Fix typos
GitOrigin-RevId: 69477e3d95db2862f745f43d97a6f98430a1973c
2024-08-01 08:05:01 +00:00
andrew rumble
67cb9fc1b3 Separate qs out from url
GitOrigin-RevId: 8a1c45d3d71240e63f78f2f1920b324577eb7e6d
2024-08-01 08:04:56 +00:00
andrew rumble
709982ac65 Switch request out for fetch
GitOrigin-RevId: b011976084d113c250b002c1bae23f6b38a3281c
2024-08-01 08:04:52 +00:00
andrew rumble
2ccd39b2fa Switch to using status over statusCode
This is a difference in the request/fetch APIs.

GitOrigin-RevId: bde9adcf4de2ceaabfd9baae7a93bf2b0b5e5a1e
2024-08-01 08:04:47 +00:00
andrew rumble
0a62bc1239 Fix typo in name of method
GitOrigin-RevId: fe8a2bcf5e577c001c4508b7bb010e1738ccc903
2024-08-01 08:04:42 +00:00
M Fahru
e811436dd4 Merge pull request #19648 from overleaf/mf-remove-strike-plans-page
Convert `strike` to `s` because `strike` was already deprecated

GitOrigin-RevId: 48dc9fe1a20c1b354c0935d313b1fc5f515cd1fa
2024-07-31 08:05:33 +00:00
Jessica Lawshe
223a4efd3d Merge pull request #19618 from overleaf/jel-light-touch-btns
[web] Light touch plans redesign CTAs

GitOrigin-RevId: 7b9be331420044fda08eac563567f1cce4c0c1c2
2024-07-31 08:05:29 +00:00
Jessica Lawshe
9e665c3a10 Merge pull request #19616 from overleaf/jel-light-touch-educational
[web] Light touch plans redesign license picker and `?` icon

GitOrigin-RevId: 071842c37e2129cf62981317f7a23b8cd5410dba
2024-07-31 08:05:24 +00:00
Antoine Clausse
1e36db524f [web] Merge authentication error handling (V1LoginController & AuthenticationController) (#19457)
* Promisify `AuthenticationController.doPassportLogin`

* Update tests `AuthenticationController.doPassportLogin`

* Add test on error handling for `AuthenticationController.doPassportLogin`

* Add test on error handling for `V1LoginController.doLogin`

* Extract error handling to `getErrorObject` function

* Simplify code

* Add `Metrics` calls

* Add `password is too long` in AuthenticationController

* Make `info` object consistent with the rest of the codebase

* Move error handling to `AuthenticationManager.handleAuthenticateErrors`

* Move `handleAuthenticateErrors` to other file

I moved this solely because I didn't manage to test it otherwise

* Update tests

* Remove `preDoPassportLogin` hook call

* Remove test on `preDoPassportLogin`

* Use try/catch block instead of `.catch()`

* Revert "Use try/catch block instead of `.catch()`"

This reverts commit 3475afa93ce4af7ad55c91bfc1d7ad3317600ea5.

* Replace `.catch` by `try/catch`

GitOrigin-RevId: 3fba65c30a2c5fc6e5abcd5b83c52801852ed462
2024-07-31 08:05:07 +00:00
Jimmy Domagala-Tang
837fea03b9 Merge pull request #19448 from overleaf/jdt-experiments-max-subscribers
Enforce a maximum participant cap on experiments

GitOrigin-RevId: 1d9263cd34a3d0c831c0ed43867bb4e6430eb06c
2024-07-30 08:05:34 +00:00
Alexandre Bourdin
5bc5b1af2a Merge pull request #19562 from overleaf/ab-modules-dependencies
[web] Modules dependencies

GitOrigin-RevId: d8bbb25a754f2ed58b1b1e924aa760b87d3135c6
2024-07-30 08:04:36 +00:00
Antoine Clausse
5f2718cf29 [web] Make rate-limit on login consistent, prevent "trim/case bypass" (#19555)
* Replace `LoginRateLimiter.processLoginRequest` call by use of `RateLimiterMiddleware`

* Lowercase the email to avoid rate-limit bypass

* Remove unit test "when the users rate limit"

* Use `EmailHelper.parseEmail` to normalize email in `processLoginRequest`

This should address the `trim()` bypass

* Use `.trim().toLowerCase()` instead of `EmailHelper.parseEmail`

We can't use `EmailHelper.parseEmail`, else it breaks the test (and feature): "with username that does not look like an email"

* Add acceptance test for rate limit

* Add comment on rate limits

* Rename `rateLimiter` to `rateLimiterLoginEmail` for clarity

* Make the login rate limits configurable from the settings

GitOrigin-RevId: cf1c3a416745f2b007c85014a5084570d4a049a7
2024-07-30 08:04:26 +00:00
Antoine Clausse
7212c16dde [web] Fix: sendConfirmationEmail promise (!!!) (#19629)
* Fix `sendConfirmationEmail` promise (!!!)

* Fix: No nested promises, and `sendConfirmationEmail`->`sendReconfirmationEmail`

* Add integration test on `/user/emails/send-reconfirmation`

* Update integration test: use the previously generated token

GitOrigin-RevId: f6386abeb06888351eec22fbcb1d3c614ff5c5c5
2024-07-29 08:04:41 +00:00
Antoine Clausse
afd965c04b [web] Remove overleaf-integration overrides for /user/emails/delete & /user/emails/resend_confirmation (#19438)
* Use hooks to call `clearSamlSession`

* Promisify `UserEmailsController.remove`

* Use hook for `userDeleteEmailMiddleware`

* Remove `/user/emails/delete` override

* Remove "removeRoute of `/user/emails/resend-secondary-confirmation`"

That route isn't defined elsewhere

* Promisify `UserEmailsController.resendConfirmation`

* Promisify `UserEmailsController.sendReconfirmation`

* Use hook for `resendConfirmationEmailMiddleware`

* Remove `/user/emails/resend_confirmation` override

* Promisify `tryDeleteUser`

* Proxy `clearSamlSession` through `SAMLHelper`

* Revert "Use hook for `resendConfirmationEmailMiddleware`"

This reverts commit f028d9c8

* Inject `SAMLMiddleware.resendConfirmationEmailMiddleware` in `/user/emails/resend_confirmation`

* Update `middleware` syntax and grammar

* Update tests

* Use Module middleware instead of hook for `userDeleteEmailMiddleware`

* Remove "promises" export of tryDeleteUser

GitOrigin-RevId: 211e194fc1ef82dc452ee4e837dcddd9b23690a0
2024-07-29 08:04:24 +00:00
Jessica Lawshe
606f9eaec7 Merge pull request #19594 from overleaf/jel-light-touch-table-checkmark
[web] Add new green checkmark to plans light touch redesign

GitOrigin-RevId: f6c38e819fdd784ccf39ab09109a33fcd58f23d8
2024-07-26 08:05:02 +00:00