Skip to content

ISS-167739: Update Fern to support use default theme flag in documentation #218

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

Conversation

dhananjayj-dev
Copy link
Contributor

This PR updates the Fern documentation to include details about the useDefaultTheme flag. The new section demonstrates how to enable this flag to ensure the support feature always uses the default theme, regardless of the user’s system theme setting. This enhancement helps developers maintain consistent UI behavior across environments.

@dhananjayj-dev dhananjayj-dev requested a review from bojan May 6, 2025 15:27
@dhananjayj-dev dhananjayj-dev self-assigned this May 6, 2025
@dhananjayj-dev dhananjayj-dev requested a review from a team as a code owner May 6, 2025 15:27
Copy link
Contributor

github-actions bot commented May 6, 2025

🌟 EkLine Reviewer

Hello! I’m here to help improve your docs. I’ve reviewed your pull request, and left in-line suggestions for quick fixes. For details, visit the Analytics Page.

For questions or feedback, please email support@ekline.io.

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

If you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.

@bojan
Copy link
Contributor

bojan commented May 6, 2025

Also, let's update the PR title and description to use the proper terminology, the useDefaultTheme is not used.

@bojan bojan self-requested a review May 6, 2025 15:49
Copy link
Contributor

@bojan bojan left a comment

Choose a reason for hiding this comment

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

I missed something in the original review.

Comment on lines 71 to 77

The DevRev SDK allows you to configure the theme dynamically based on the system appearance or use a default theme configured in the DevRev portal.

```swift
DevRev.prefersSystemTheme: Bool
```

Copy link
Contributor

Choose a reason for hiding this comment

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

A few things here:

  • We should be consistent with the spacing, there shouldn't be a new line after a section.
  • This property is meant to be used across all products, same as the in-app link handling. It's not specific to the support chat. Let's move it below the In-app link handling on the same level.
  • The wording should be:

    The DevRev SDK allows you to configure the theme dynamically based on the system appearance, or use the theme configured on the DevRev portal.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Yug2801 make sure you sync the changes with @dhananjayj-dev.

Comment on lines 101 to 104
// When set to true (default), the DevRev UI will adapt theme dynamically to the system appearance.
// Set this flag to false to force the DevRev UI to use the default theme configured in the DevRev portal.
DevRev.prefersSystemTheme: Bool

Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this example. The property itself is self-explaining.

@dhananjayj-dev dhananjayj-dev requested a review from bojan May 7, 2025 06:26
@@ -157,6 +157,14 @@ You can further customize the behavior by setting the `shouldDismissModalsOnOpen
DevRev.shouldDismissModalsOnOpenLink: Bool
```

## Dynamic Theme Configuration

The DevRev SDK allows you to configure the theme dynamically based on the system appearance, or use the theme configured on the DevRev portal. By default, the theme will be dynamic and follow the system appearance.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [EkLine] reported by reviewdog 🐶

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
The DevRev SDK allows you to configure the theme dynamically based on the system appearance, or use the theme configured on the DevRev portal. By default, the theme will be dynamic and follow the system appearance.
The DevRev SDK allows you to configure the theme dynamically based on the system appearance, or use the theme configured on the DevRev portal. By default, the theme is dynamic and follows the system appearance.

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [EkLine] reported by reviewdog 🐶

Consider using 'go' instead of 'navigate'. (EK25033)

The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although view controllers are automatically tracked, you can manually track screens using the following method:

Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [EkLine] reported by reviewdog 🐶

Remove 'properly ' if it's not important to the meaning of the statement. (EK00006)

To properly handle push notifications, implement the following method, typically in either the `UNUserNotificationCenterDelegate.userNotificationCenter(_:didReceive:)` or `UIApplicationDelegate.application(_:didReceiveRemoteNotification:fetchCompletionHandler:)`:

@dhananjayj-dev dhananjayj-dev merged commit 209e865 into feature/ISS-158592-unify-moble-sdk-guide May 7, 2025
2 checks passed
@dhananjayj-dev dhananjayj-dev deleted the feature/ISS-167739-update-default-theme-feature branch May 7, 2025 06:42
dhananjayj-dev added a commit that referenced this pull request May 20, 2025
* Add flutter documentation

* Add flutter documentation

* Add a missing In app link handling section

* Add react native expo documetation

* Add a new platforms in the SDK index

* Split iOS documentations in sub pages

* Add the migration guide

* Split the android documentation sections

* Split the cordova documentation sections

* Split the React Native documentation sections

* Add migration guide for flutter

* Add links to new platforms SDK integration docs

* Split the Flutter documentation sections

* Split the React Native Expo documentation sections

* Use the better icons new platforms

* Move under right namespaces and update linkings

* ISS-167739: Update Fern to support use default theme flag in documentation (#218)

* Update the latest default theme feature iOS documentations

* Move this code snippet and description in support section from UIKit

* Improve the documentation for dynamic theme configuration

* Make it sentence case for consistency

* Remove flutter documentation

* Add sample app section

* Update the android documentations with the latest read me guides

* Update documentation with the latest read me guide of iOS

* Remove the linking of flutter documentation

* Change the header casing to sentence case

* Update the platforms and fix the indentations

* Move web SDK under the web namespace

* Move web SDK under the web namespace

* Move all mobile SDKs under the mobile namespace

* Update the paths

* Move all mobile SDKs under the mobile namespace

* Fix the typos

* Update to the correct icon

* Add the missing slugs for and its contents for new pages

* Update the links for redirections to the pages

* Add the missing screenshot

* Update the path

* Fix the navigations

* Fix the typo

* Fix the filename in path

* Fix the typos

* Fix the navigations

* Remove unneeded pages

* Keep features page and remove the other file

* Fix the navigation for push notification page

* Add sample app section in quick start guide for Android

* Improve description in sample app section and add links for public repositories

* Fix the description in sample app section

* Improve the description in sample app section

* Add a separate quick start guide for Expo

* Fix the duplicate slug

* Improve the menu names for React native and Expo quickstart guide

* consistent PLuG Web SDK usage

* Update fern/docs/pages/sdks/mobile/react-native/quickstart-expo.mdx

Co-authored-by: Ben Colborn <ben.colborn@devrev.ai>

* Update fern/docs/pages/sdks/mobile/react-native/quickstart-expo.mdx

Co-authored-by: Ben Colborn <ben.colborn@devrev.ai>

* Update the setup section to make it consistent with other platforms

* Update Android documentation to choose DevRev theme or system theme preference

* Update React Native documentation to choose DevRev or system preferred theme

* Fix the method signature

* Update the feature to only iOS for now

* Remove prefers theme feature from Android temporarily

---------

Co-authored-by: Ben Colborn <ben.colborn@devrev.ai>
Co-authored-by: Bojan Dimovski <hello@bojandimovski.com>
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