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

(DOCSP-39165) Node and RN: Change baseURL during runtime #3243

Merged
merged 10 commits into from
May 10, 2024

Conversation

krollins-mdb
Copy link
Collaborator

@krollins-mdb krollins-mdb commented May 3, 2024

Pull Request Info

Jira ticket: https://jira.mongodb.org/browse/DOCSP-39165

This PR adds content to both the Node.js and React Native SDKs for changing the base URL during runtime. However, it only includes examples for the Node.js SDK. Right now, the experimental module does not really work for React Native. So, the React Native content notes that this feature exists, but is experimental and points to the Node.js content.

Sorry for the large number of changed files. I couldn't resist removing an old React Native app that we weren't using for anything.

Build errors:

  • There's a build error about not being able to find label:node-change-server-during-runtime. Manually testing shows the ref link working.
  • Looks like there are a couple flaky React Native tests. They're unrelated to any changes I've made. I'll need to set aside time to look at them later.

Reminder Checklist

Before merging your PR, make sure to check a few things.

  • Did you tag pages appropriately?
    • genre
    • meta.keywords
    • meta.description
  • Describe your PR's changes in the Release Notes section
  • Create a Jira ticket for related docs-app-services work, if any

Release Notes

  • Node.js SDK
    • App Services/Connect to an Atlas App Services Backend: Add new sections and examples for updating the baseUrl, including during runtime.
  • React Native SDK
    • App Services/Connect to an Atlas App Services App: Add new sections that address updating the baseUrl.

Review Guidelines

REVIEWING.md

Animal Wearing a Hat

Copy link

github-actions bot commented May 3, 2024

Readability for Commit Hash: a4bb7e3

You can see any previous Readability scores (if they exist) by looking
at the comment's history.

Readability scores for changed documents:

  • source/sdk/react-native/app-services/connect-to-app-services-app: Grade Level: 7.5, Reading Ease: 60.61
  • source/sdk/node/app-services/connect-to-app-services-backend: Grade Level: 8.1, Reading Ease: 58.89

For Grade Level, aim for 8 or below.

For Reading Ease scores, aim for 60 or above:

Score Difficulty
90-100 Very Easy
80-89 Easy
70-79 Fairly Easy
60-69 Medium
50-59 Fairly Hard
30-49 Hard
0-29 Very Hard

For help improving readability, try Hemingway App.

@krollins-mdb krollins-mdb marked this pull request as ready for review May 6, 2024 14:24
Copy link
Collaborator

@lindseymoore lindseymoore left a comment

Choose a reason for hiding this comment

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

A few nits and a question about including code examples for passing in a baseURL for RN.


Currently, this feature is implemented as an experimental module that requires
specific TypeScript configuration. The required configuration can be difficult
to make work with a React Native app. Refer to :ref:`documentation for the
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -93,3 +93,32 @@ To encrypt App metadata:
#. Pass the App configuration object to ``new Realm.App()``.

.. include:: /examples/generated/react-native/v12/EncryptMetadata.snippet.encrypt-metadata.tsx.rst

Connect to a Specific Server
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it not possible to include a code example for passing in a baseURL? Would be nice to include an example if possible.

Copy link
Collaborator Author

@krollins-mdb krollins-mdb May 9, 2024

Choose a reason for hiding this comment

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

Not a tested code example. It doesn't work well right now with TypeScript and React Native. 😢 It's also not worth investing the time to make it work properly with our test suite.

Copy link
Collaborator

Choose a reason for hiding this comment

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

A shame :(

krollins-mdb and others added 2 commits May 9, 2024 14:59
Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com>
Copy link
Collaborator

@lindseymoore lindseymoore left a comment

Choose a reason for hiding this comment

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

Small comment, otherwise LGTM!

Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com>
@krollins-mdb krollins-mdb merged commit 085c08e into mongodb:master May 10, 2024
7 of 8 checks passed
@krollins-mdb krollins-mdb deleted the DOCSP-39165 branch May 10, 2024 12:42
@docs-builder-bot
Copy link

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.

3 participants