Skip to content

(DOCSP-39530): Consolidate Multi-User Applications page #3323

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

Merged
merged 11 commits into from
Jul 19, 2024

Conversation

dacharyc
Copy link
Collaborator

@dacharyc dacharyc commented Jul 16, 2024

Pull Request Info - SDK Docs Consolidation

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

Staged Page

Page Source

Add links to every SDK's pages where you got the SDK-specific information:

PR Author Checklist

Before requesting a review for your PR, please check these items:

  • Open the PR against the feature-consolidated-sdk-docs branch instead of master
  • Tag the consolidated page for:
    • genre
    • meta.keywords
    • meta.description

Naming

Links and Refs

  • Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections
  • Remove or update any SDK-specific refs to use the new consolidated SDK ref targets
  • Update any Kotlin API links to use the new Kotlin SDK roles

Content

  • Shared code boxes have snippets or placeholders for all 9 languages
  • API description sections have API details or a generic placeholder for all 9 languages
  • Check related pages for relevant content to include
  • Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic

Reviewer Checklist

As a reviewer, please check these items:

  • Shared code example boxes contain language-specific snippets or placeholders for every language
  • API reference details contain working API reference links or generic content
  • Realm naming/language has been updated
  • All relevant content from individual SDK pages is present on the consolidated page

@dacharyc dacharyc added the merge to feature branch Unreleased feature - do not merge to Master label Jul 16, 2024
Copy link

github-actions bot commented Jul 16, 2024

Readability for Commit Hash: 824087b

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

Readability scores for changed documents:

  • source/sdk/users/multi-user-applications: Grade Level: 8.8, Reading Ease: 57.06

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.


.. tab::
:tabid: dart

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is intentionally missing a description, because I'm just re-using a code example from the Authentication page as a placeholder. This should get a description when we address the consolidation gaps ticket, per the TODO reminder in line 142 above. Apparently our tab directive does not support commented-out text in a tab - it just wanted to render it as regular text - so I had to put the todo above the tab block.

Copy link
Collaborator

@cbullinger cbullinger Jul 18, 2024

Choose a reason for hiding this comment

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

Apparently our tab directive does not support commented-out text in a tab - it just wanted to render it as regular text - so I had to put the todo above the tab block.

interesting...

@dacharyc dacharyc marked this pull request as ready for review July 17, 2024 20:57
Copy link
Collaborator

@cbullinger cbullinger left a comment

Choose a reason for hiding this comment

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

LGTM!

Placeholder page for multi-user application content.
.. tabs-selector:: drivers

Atlas Device SDK allows multiple :ref:`users <user-accounts>` to be logged in
Copy link
Collaborator

Choose a reason for hiding this comment

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

general comment that applies to all the of the links out to App Services user docs pages (e.g. here and ln 56): I know Kyle was pushing back on the "in the App Services documentation", but is there any other way we can flag that this link is taking you out of the SDK docs? esp for really generic link text like "users" -- I have no idea where that's taking me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Honestly, since we're talking about potentially moving the server-side docs to co-exist with the SDK docs, I'm thinking we probably don't want to put a lot of words in our docs specifying you're going to a different docs set - because hopefully that will change soon. 🤞

Maybe it won't?

But generally it seems we are not aligned as a team on how to handle this, so I'm going with "leave it like it currently is" as part of the consolidation work, and we can revisit if/when we get aligned about this.

@@ -0,0 +1,3 @@
In the example below, the active user is initially switched to ``user1``
using the :js-sdk:`Realm.App.switchUser() <classes/App.html#switchUser>` method.
Copy link
Collaborator

Choose a reason for hiding this comment

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

noting this since it came up while I was reviewing Omar's PR: links to the JS API docs don't seem to honor the URL anchors (at least, they don't for me). it just lands you at the top of the page every time

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, that might be something browser-specific? I use generic Chrome with no extensions and it honors the URL anchors for me.

@@ -0,0 +1 @@
You can change the active user with the ``App.switch(to: User)`` method.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q on the code example for this -- is it supposed to include the second half commented out?

let app = App(id: YOUR_APP_SERVICES_APP_ID)

// ... log in ...
// Get another user on the device, for example with `app.allUsers`
let secondUser: User = getSomeOtherUser()

XCTAssertNotEqual(app.currentUser, secondUser)
// assert(app.currentUser != secondUser)

// Switch to another user
// app.switch(to: secondUser)

// The switch-to user becomes the app.currentUser
// XCTAssertEqual(app.currentUser, secondUser)
// assert(app.currentUser == secondUser)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This example definitely needs to be updated, and is called out in the Swift follow-up ticket.

dacharyc and others added 2 commits July 19, 2024 12:35
Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com>
@dacharyc dacharyc merged commit f8eb607 into mongodb:feature-consolidated-sdk-docs Jul 19, 2024
6 checks passed
@dacharyc dacharyc deleted the DOCSP-39530 branch July 19, 2024 17:58
@docs-builder-bot
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge to feature branch Unreleased feature - do not merge to Master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants