-
Notifications
You must be signed in to change notification settings - Fork 26
Enhance README.md with detailed explanations of Screen Time APIs, ins… #58
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
Enhance README.md with detailed explanations of Screen Time APIs, ins… #58
Conversation
WalkthroughThe README.md for Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant API
participant ShieldUI
User->>App: Request permission & select app
App->>API: Request authorization
API-->>App: Authorization granted
App->>ShieldUI: Configure shield appearance & actions
App->>API: Schedule monitoring
API-->>App: Monitoring active
User->>App: Change settings or stop monitoring
App->>API: Update or stop schedule
API-->>App: Schedule updated/stopped
App->>User: Feedback & updates
Possibly related PRs
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
README.md(4 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~14-~14: A comma might be missing here.
Context: ...our use case you might not need all the APIs hence not all the new bundle identifier...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[grammar] ~120-~120: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...
(THE_SUPERLATIVE)
[style] ~152-~152: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...pproval for 4 bundleIdentifiers (if you want to use all the native extensions that is, ...
(REP_WANT_TO_VB)
[uncategorized] ~159-~159: A comma might be missing here.
Context: ...ShieldConfiguration Once you've gotten approval you need to manually add the "Family Co...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~232-~232: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...interval. The main principle is that you're configuring these apps to be blocled with FamilyCon...
(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)
[uncategorized] ~398-~398: A comma might be missing here.
Context: ...I Reference (the list is not exhaustive yet please refer to the Typescript types fo...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
🪛 markdownlint-cli2 (0.17.2)
README.md
138-138: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
404-404: Inline HTML
Element: br
(MD033, no-inline-html)
404-404: Inline HTML
Element: br
(MD033, no-inline-html)
410-410: Inline HTML
Element: br
(MD033, no-inline-html)
410-410: Inline HTML
Element: br
(MD033, no-inline-html)
410-410: Inline HTML
Element: br
(MD033, no-inline-html)
410-410: Inline HTML
Element: br
(MD033, no-inline-html)
417-417: Inline HTML
Element: br
(MD033, no-inline-html)
417-417: Inline HTML
Element: br
(MD033, no-inline-html)
420-420: Inline HTML
Element: br
(MD033, no-inline-html)
423-423: Inline HTML
Element: br
(MD033, no-inline-html)
🔇 Additional comments (1)
README.md (1)
398-398: 🧹 Nitpick (assertive)Add missing comma in heading
Improve readability by inserting a comma:- ## API Reference (the list is not exhaustive yet please refer to the Typescript types for the full list) + ## API Reference (the list is not exhaustive yet, please refer to the Typescript types for the full list)Likely an incorrect or invalid review comment.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~398-~398: A comma might be missing here.
Context: ...I Reference (the list is not exhaustive yet please refer to the Typescript types fo...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
…tallation instructions, and examples for using the FamilyControl, ShieldConfiguration, and ActivityMonitor APIs.
361c05d to
35ac177
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (4)
README.md (4)
1-2: Consider adding a Table of Contents
Given the length and depth of this README, including a TOC immediately after the main title will greatly improve navigation for readers.
14-14: Add missing comma before “hence”
Punctuation needed for clarity:- Note: Depending on your use case you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
351-351: Correct typo “blocled” → “blocked”
Fix the misspelling to improve clarity:- configuring these apps to be blocled with FamilyControl API + configuring these apps to be blocked with FamilyControl API
523-523: Remove inline HTML in table cell
Avoid<br>tags in tables; use Markdown line breaks (two spaces) or separate rows:- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle + `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(5 hunks)
🔇 Additional comments (6)
README.md (6)
30-37: Code fence has correct language tag
Thetypescripttag ensures proper highlighting for theshieldConfigexample. No change needed.
45-52: Code fence has correct language tag
Thetypescripttag ensures proper highlighting for theshieldActionsexample.
59-69: Code fence has correct language tag
Thetypescripttag is properly specified for thestartMonitoringsnippet.
75-82: Code fence has correct language tag
Thebashtag makes the installation commands clear.
8-8: 🧹 Nitpick (assertive)Add terminating period to tagline
For consistency and to follow sentence conventions, consider ending this line with a period:- React Native wrapper for Apple's Screen Time, Device Activity and Family Controls APIs + React Native wrapper for Apple's Screen Time, Device Activity and Family Controls APIs.Likely an incorrect or invalid review comment.
255-255: 🧹 Nitpick (assertive)Add commas around parenthetical clause
Frame the parenthetical with commas for readability:- Depending on your use case (if you need different schedules for different days, for example) you might need multiple monitors. + Depending on your use case, (if you need different schedules for different days, for example,) you might need multiple monitors.Likely an incorrect or invalid review comment.
…ontents, clarify API usage, and improve installation instructions for Expo and bare React Native projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🔭 Outside diff range comments (1)
README.md (1)
202-207: 🧹 Nitpick (assertive)Standardize code block language tags.
Some fences useTypeScriptwhile others usetypescript(or vary in casing). For consistency and proper syntax highlighting, use the lowercasetypescripttag throughout.
♻️ Duplicate comments (2)
README.md (2)
166-168: Specify language for fenced code block.
This code snippet lacks a language identifier, which was raised in a previous review. Please addbashafter the opening backticks:- ``` + ```bash
42-42: 🧹 Nitpick (assertive)Clarify sentence structure with a semicolon.
Consider splitting or adding a semicolon before “hence” for better readability:- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(6 hunks)
🔇 Additional comments (3)
README.md (3)
10-10: Well-structured alert callout.
The "⚠️ Important" warning is prominent and links correctly to the entitlement section. Nice improvement!
12-24: Good addition: Table of Contents.
The detailed TOC improves navigation for lengthy documentation.
40-40: Moved WWDC reference out of heading.
Great callout placement with_See [WWDC21]..._outside the main heading.
README.md
Outdated
| ## Table of Contents | ||
|
|
||
| Please note that it only supports iOS (and requires iOS 15 or higher) and requires a Custom Dev Client to work with Expo. For Android I'd probably look into [UsageStats](https://developer.android.com/reference/android/app/usage/UsageStats), which seems provide more granularity. | ||
| - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken anchor in TOC for the first heading.
The link [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) does not match the actual heading ID ## Apple's Screen Time APIs Explained. Update the anchor to #apples-screen-time-apis-explained.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (6)
README.md (6)
8-8: Consider adding an Oxford comma
For consistency and clarity, insert a comma before “and Family Controls”:- React Native wrapper for Apple's Screen Time, Device Activity and Family Controls APIs. + React Native wrapper for Apple's Screen Time, Device Activity, and Family Controls APIs.
148-148: Add missing article for correctness
Change “make a best guess” to “make the best guess” to fix the superlative usage:- We try to make a best guess here … + We try to make the best guess here …
551-551: Remove inline HTML tags in table cells
Replace<br>with native Markdown line breaks or a list to satisfy lint rules:- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle + `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle
545-545: 🧹 Nitpick (assertive)Correct “Typescript” casing
Use “TypeScript” in the API reference heading for proper branding:- ## API Reference (the list is not exhaustive yet please refer to the Typescript types for the full list) + ## API Reference (the list is not exhaustive yet please refer to the TypeScript types for the full list)
42-42: 🧹 Nitpick (assertive)Improve punctuation in overview note
Split or punctuate for readability—add a semicolon and commas:- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all bundle identifiers and capabilities are required.
12-37:⚠️ Potential issueFix broken anchor in Table of Contents
The first TOC entry links to#apples-screen-time-apis-explained-for-official-details-wwdc21, but the heading ID is#apples-screen-time-apis-explained. Update accordingly:- - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) + - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(6 hunks)
🔇 Additional comments (1)
README.md (1)
1-2: Title is clear and follows conventions
Using the package name as the sole H1 is the standard for GitHub READMEs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🔭 Outside diff range comments (1)
README.md (1)
195-204: 🧹 Nitpick (assertive)Consolidate and correct nested code fences in the example
The use of four backticks and an innerTypeScriptblock can break rendering. Consider using a single fenced block with the proper language tag and remove the nested fence:- ````typescript - ```TypeScript + ```typescript import * as ReactNativeDeviceActivity from "react-native-device-activity"; ReactNativeDeviceActivity.revokeAuthorization(); // …rest of the example… - ``` - ```` + ```
♻️ Duplicate comments (2)
README.md (2)
14-14: 🛠️ Refactor suggestionFix broken TOC anchor for "Apple's Screen Time APIs Explained"
The link slug includes an extra suffix (-for-official-details-wwdc21) that doesn’t match the actual heading anchor. Update it to match the heading## Apple's Screen Time APIs Explained.- - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) + - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)
42-42: 🧹 Nitpick (assertive)Improve sentence structure in the introductory note
This line runs two independent clauses with “hence”—consider using a semicolon and pluralizing “bundle identifiers” for clarity.- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(6 hunks)
🔇 Additional comments (1)
README.md (1)
35-36: Verify TOC anchors for special characters in "Weird behaviors⚠️ " and "Troubleshooting 📱"
The current TOC links:- [Weird behaviors ⚠️](#weird-behaviors-) - [Troubleshooting 📱](#troubleshooting-)may not resolve correctly because of the trailing hyphens and emoji. Please confirm the generated slug (e.g., by testing the browser’s anchor target) and update the links accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
🔭 Outside diff range comments (1)
README.md (1)
195-228:⚠️ Potential issueIncorrect code fencing
A four-backtick fence is used here, inadvertently including the## Select Apps to trackheading within the code block. Switch to a standard triple-backtick fence (```typescript) for the snippet and close it before the next Markdown heading.
♻️ Duplicate comments (3)
README.md (3)
42-42: 🧹 Nitpick (assertive)Refine punctuation in note
Consider using a semicolon before “hence” and adding a comma after it for clarity:- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifiers and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
545-550: 🛠️ Refactor suggestionRemove inline HTML in table cells
Replace<br>tags in the Props column with native markdown line breaks or split into multiple lines:- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle + `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle
553-556: 🛠️ Refactor suggestionRemove inline HTML in hook table
Convert<br>breaks into native markdown or separate rows. Example:- `onSave`: () => void<br>`onCancel`: () => void<br>`handleSelectionChange`: (event) => void + `onSave`: () => void + `onCancel`: () => void + `handleSelectionChange`: (event) => void
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(6 hunks)
🔇 Additional comments (44)
README.md (44)
1-2: Project Title: The title is clear and follows GitHub conventions.
8-8: Great introduction tagline: The one-line description effectively summarizes the library’s purpose.
10-10: Prominent warning: The callout about Apple entitlement requirements is clear and actionable.
38-40: Section header formatting: The relocated WWDC21 reference under the heading is well–formatted and improves readability.
52-52: Blank line for visual separation.
58-65: ShieldConfiguration example: The TypeScript snippet is properly fenced and provides a clear configuration example.
67-68: ShieldAction section header: TheShieldAction APIheading clearly delineates the next API subsection.
74-80: ShieldAction example: The TypeScript snippet is well–fenced and demonstrates primary button behavior accurately.
82-83: ActivityMonitor header: TheActivityMonitor APIheading is descriptive and correctly placed.
90-100: startMonitoring example: The code sample illustrates scheduling and repetition options clearly.
102-103: Installation header: The managed Expo installation section is introduced with a clear##heading.
106-110: Install command snippet: Thebashfence is specified correctly, showing both npm and yarn alternatives.
114-133: Expo plugin config: The JSON snippet is valid, correctly fenced, and shows the necessaryapp.jsonsettings.
136-138: Prebuild command: Thenpx expo prebuild --platform iossnippet is properly fenced asbash.
140-145: Xcode Targets verification: The list of targets to check in Xcode is clear and actionable.
146-146: Notes header: The### Some Notesheading matches the TOC and is appropriately capitalized.
164-164: Bare React Native heading: The### Add the package to your npm dependenciesheading is clear and precise.
174-179: Entitlement section clarity: The## Family Controls (distribution) entitlement requires approval from Applesection effectively emphasizes the need for early Apple approval.
191-193: Basic example header: The heading for the event tracking example is concise and descriptive.
232-233: Implementation notes: The tips on SwiftUI fallback views and token size considerations are valuable for production readiness.
283-283: Monitor limit reminder: The note about the 20-monitor limit and usingDateComponentsis a helpful caveat.
377-379: Alternative example header: The## Alternative Example: Blocking Apps for a Time Slotheading clearly introduces a more complex use case.
382-385: Example imports: The TypeScript import statements are properly fenced and demonstrate required modules.
386-390: Constants definition: DeclaringSELECTION_ID,SHIELD_CONFIG_ID, andACTIVITY_NAMEat the top enhances clarity.
391-399: Authorization flow: TheuseEffectforrequestAuthorizationwith status logging provides a clear initialization pattern.
401-404: State management: UsinguseState<string | null>to track the activity selection is intuitive.
406-409: Event handler: ThehandleSelectionChangecallback cleanly processes native events and updates state.
411-417: Selection persistence: Validating the selection before saving and alerting on error is good UX.
418-422: Saving selection ID: DemonstratingsetFamilyActivitySelectionIdfor extension communication is effective.
424-428: Shield configuration workflow: The transition from saving selection to callingconfigureBlockingis logical.
431-436: Shield UI settings: TheshieldConfigobject is concise and clearly labeled.
439-443: Shield actions: TheshieldActionsdefinition demonstrates primary action behavior correctly.
446-447: API call: TheupdateShieldinvocation is properly demonstrated with both config and actions.
449-458: Action scheduling: BothconfigureActionsexamples for interval start and end are well–structured.
474-483: Scheduling function: ThestartScheduledBlockingasync function, with both production and test schedules, is comprehensive.
485-494: Test schedule example: Showing dynamic time calculation for testing is a practical demonstration.
499-504: Monitoring invocation: Theawait startMonitoringcall is correctly placed within the error-handling flow.
506-510: Error handling: Logging errors and notifying users viaAlert.alertbalances debugging and UX.
513-531: JSX layout: The component structure, with selection view and save button, is clearly demonstrated.
535-543: Key Concepts recap: The numbered summary provides a quick reference to the main API concepts.
572-574: Contributing section: The call for contributions and link to guidelines is clear and user-friendly.
576-577: Weird behaviors section: Documenting API quirks helps developers troubleshoot unexpected behavior.
590-594: Troubleshooting tips: Providing multiple troubleshooting steps for Screen Time API issues is very helpful.
600-603: Troubleshooting completeness: The final tips on privacy restrictions and resetting settings round out the section well.
commit: |
robertherber
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this @Arlevoy, I think it looks great. Just go through the CodeRabbit suggestions and I think we're good to merge (it can be a bit nitpicky but pretty good for docs)! 😊
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
Sorry I did not see your answer!! Will do very soon, thanks a lot ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
README.md (1)
204-206: 🧹 Nitpick (assertive)Standardize code fence language for TypeScript
Use a lowercase language identifier for consistency with other fences:- ```TypeScript + ```typescript
♻️ Duplicate comments (9)
README.md (9)
10-10: Consider moving the⚠️ warning into a dedicated Prerequisites section
This critical note is easily missed at the top of the README. Promoting it to its own “Prerequisites” or “Before You Begin” section improves visibility for developers who need Apple entitlements.
20-20: Unify casing between TOC entry and heading for "Some Notes"
The TOC uses[Some notes](#some-notes)while the heading is### Some Notes. Ensure both are identical (e.g., capital “N” in the TOC).Also applies to: 146-146
166-168: Add language specifier to the code fence
This bare React Native install snippet is missing a language tag for syntax highlighting. For example:- ``` + ```bash npm install react-native-device-activity - ``` + ```
42-42: 🧹 Nitpick (assertive)Improve clarity and punctuation in the introductory note
The sentence is a run-on. Consider adding a semicolon and commas for readability:- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
14-14:⚠️ Potential issueFix broken anchor in Table of Contents for the main section
The link refers to#apples-screen-time-apis-explained-for-official-details-wwdc21but the actual heading is## Apple's Screen Time APIs Explained, which generates#apples-screen-time-apis-explained. Please update the TOC entry to:- [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) + [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)
561-569: 🧹 Nitpick (assertive)Remove inline HTML
<br>tags in the Functions table
The parameters column uses<br>tags. Refactor to a multi-line list for better readability and lint compliance:- `activityName`: string<br>`schedule`: DeviceActivitySchedule<br>`events`: DeviceActivityEvent[] + - `activityName`: string + - `schedule`: DeviceActivitySchedule + - `events`: DeviceActivityEvent[]
382-384: 🧹 Nitpick (assertive)Include missing imports for
ViewandButtonin the Alternative Example
The component uses<View>and<Button>but only importsAlert. Add the necessary imports so the example compiles:import { useEffect, useState } from 'react'; - import { Alert } from 'react-native'; + import { Alert, View, Button } from 'react-native';
548-551: 🧹 Nitpick (assertive)Remove inline HTML
<br>tags in the Components table
Markdown lint flags inline HTML. Replace these with native line breaks or multiple rows for correct formatting:- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle + `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle
555-558: 🧹 Nitpick (assertive)Remove inline HTML
<br>tags in the Hooks table
Convert the props column to use Markdown line breaks instead of<br>tags:- `currentFamilyActivitySelection`: string \| null<br>`isActivityPickerLoading`: boolean<br>`onSave`: () => void<br>`onCancel`: () => void<br>`handleSelectionChange`: (event) => void + `currentFamilyActivitySelection`: string \| null + `isActivityPickerLoading`: boolean + `onSave`: () => void + `onCancel`: () => void + `handleSelectionChange`: (event) => void
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (14)
README.md (14)
8-8: Well-formed introductory tagline with Oxford comma
The description is concise and correctly uses an Oxford comma for clarity.
106-110: Bash code fence correctly specified
Great addition of thebashspecifier for syntax highlighting in the installation snippet.
146-146: Proper capitalization of “Some Notes”
The heading is now consistently title-cased, matching the TOC entry.
232-233: Approve list formatting
The bullets under “Some things worth noting here” are now consistently prefixed and clear.
10-10: 🧹 Nitpick (assertive)Extract warning into a Prerequisites section
Consider moving the⚠️ Important note into a dedicated “Prerequisites” or “Before You Begin” section to improve visibility and structure.
14-36:⚠️ Potential issueFix Table of Contents anchors and consistency
The TOC contains several broken or inconsistent anchors:
- The main Apple Screen Time link uses
#apples-screen-time-apis-explained-for-official-details-wwdc21but the heading slug is#apples-screen-time-apis-explained- The “Some Notes” entry is lowercased and doesn’t match the
### Some Notesheading- The “Weird behaviors
⚠️ ” and “Troubleshooting 📱” anchors include trailing hyphens and may not resolve correctlyPlease update the TOC entries to exactly match the heading IDs for reliable in-page navigation.
42-42: 🧹 Nitpick (assertive)Add punctuation for clarity
Insert a comma or semicolon before “hence” to separate clauses, e.g.:- Note: Depending on your use case you might not need all the APIs hence not all the new bundle identifiers are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers are required.
166-168: 🧹 Nitpick (assertive)Add language specifier to bare project snippet
The npm install snippet for bare React Native should use a code fence language, e.g.:- ``` + ```bash npm install react-native-device-activity
283-283: 🧹 Nitpick (assertive)Prefix missing bullet item
Add a dash before this line to include it in the list, for example:- Depending on your use case (…) + - Depending on your use case (…)
382-384:⚠️ Potential issueInclude all required imports in example
The React component uses<View>and<Button>but only importsAlert. Add the missing imports:import { useEffect, useState } from 'react'; - import { Alert } from 'react-native'; + import { Alert, View, Button } from 'react-native';
550-550: 🛠️ Refactor suggestionReplace inline HTML in components table
Use Markdown line breaks instead of<br>tags in thePropscolumn, for example:- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle + `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle
556-556: 🛠️ Refactor suggestionReplace inline HTML in hooks table
Refactor theReturnscolumn to use native Markdown breaks instead of<br>tags.
562-562: 🛠️ Refactor suggestionReplace inline HTML in functions table
Convert<br>separators into Markdown list items or line breaks for thestartMonitoringparameters.
180-183: 🧹 Nitpick (assertive)Wrap bundle identifiers in backticks
Ensure all identifiers in the list are formatted as code, for example:- - com.your-bundleIdentifier.ActivityMonitor + - `com.your-bundleIdentifier.ActivityMonitor`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(6 hunks)
🔇 Additional comments (8)
README.md (8)
1-2: Skip trivial header definition
The top-level header is clear and follows standard README conventions.
38-40: Skip structural headings
Section header and accompanying WWDC reference are correctly formatted and need no further changes.
44-44: Skip heading addition
The new### FamilyControl APIheader is correctly formatted.
51-51: Skip heading addition
The new### ShieldConfiguration APIheader is correctly formatted.
58-66: Skip example snippet
The TypeScript code block is properly fenced and clear.
114-131: Skip plugin configuration snippet
The JSON snippet uses ajsonfence and appears valid.
148-150: Skip bullet content under “Some Notes”
The bulleted items are informative and well-presented.
602-602: Approve troubleshooting tip addition
Good inclusion of the Content & Privacy Restrictions item under Troubleshooting.
…n adjustments, improved phrasing, and additional import statements for better code examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (6)
README.md (6)
14-14: Duplicate of previous feedback: fix broken TOC anchor.
The link[Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21)won’t navigate to the## Apple's Screen Time APIs Explainedheading. Update it to#apples-screen-time-apis-explained.
182-185: 🧹 Nitpick (assertive)Wrap bundle identifiers in code formatting.
Ensure each bundle identifier is in backticks for clarity, e.g.:- - com.your-bundleIdentifier + - `com.your-bundleIdentifier`
176-176: 🧹 Nitpick (assertive)Add comma after introductory phrase.
Insert a comma after “As early as possible” for readability:- As early as possible you want to [request approval from Apple](…). + As early as possible, you want to [request approval from Apple](…).
42-42: 🧹 Nitpick (assertive)Refine sentence structure around “hence”.
Add a semicolon or split into two sentences for clarity. For example:- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + Note: Depending on your use case, you might not need all the APIs; hence, not all new bundle identifiers and capabilities are required.
283-283:⚠️ Potential issueBullet missing hyphen in “Some things worth noting here” list.
This item should be prefixed with a dash to match the other bullets:- Depending on your use case (if you need different schedules for different days, for example)… + - Depending on your use case (if you need different schedules for different days, for example)…
550-563: 🛠️ Refactor suggestionRemove inline HTML
<br>tags in tables.
Convert<br>to native Markdown line breaks (two spaces + newline) or split entries into multiple rows. For instance:- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle + `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite
📒 Files selected for processing (1)
README.md(6 hunks)
🔇 Additional comments (11)
README.md (11)
1-2: Looks good: project title is clear and concise.
The repository name is prominently displayed at the top as expected.
8-8: Introduction is well phrased and includes proper Oxford comma.
The tagline succinctly describes the library’s purpose.
38-41: Section heading and reference to WWDC21 look correct.
The heading and italicized note provide proper context for readers.
44-100: The API explanation sections and corresponding examples are clear and accurate; no issues noted.
102-145: Installation instructions for managed Expo projects are well formatted with proper code fences.
148-232: The basic example and “Select Apps to track” flow are documented clearly with working code snippets.
236-282: Time tracking and block-the-shield examples compile and illustrate the functionality appropriately.
284-296: Direct blocking example looks fine.
301-336: Alternative full blocking example is comprehensive and well structured.
535-547: Key Concepts section succinctly summarizes the library’s core steps.
564-604: Contributing, weird behaviors, and troubleshooting sections provide valuable guidance.
|
@robertherber I think this is ok :) I took most of them there are nice |
… video and add a blank line for improved readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (7)
README.md (7)
30-30: TOC entry for API Reference is overly verbose
The Table of Contents link- [API Reference](#api-reference-the-list-is-not-exhaustive-yet-please-refer-to-the-typescript-types-for-the-full-list)should be shortened to
- [API Reference](#api-reference)for better readability.
42-42: 🧹 Nitpick (assertive)Use semicolon or punctuation before “hence”
The sentence currently reads:Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
Consider adding a semicolon and comma for clarity:- ...you might not need all the APIs hence not all the new bundle identifier... + ...you might not need all the APIs; hence, not all the new bundle identifiers...
176-176: 🧹 Nitpick (assertive)Add comma after introductory phrase
Insert a comma after “As early as possible” to improve readability:- As early as possible you want to request approval from Apple… + As early as possible, you want to request approval from Apple…
35-35:⚠️ Potential issueBroken anchor for “Weird behaviors
⚠️ ”
The link uses(#weird-behaviors-), which does not match the actual heading ID. Update it to remove the trailing hyphen or include the emoji slug, e.g.:- - [Weird behaviors ⚠️](#weird-behaviors-) + - [Weird behaviors ⚠️](#weird-behaviors-⚠️)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
35-35: Link fragments should be valid
null(MD051, link-fragments)
148-148: 🧹 Nitpick (assertive)Grammar: include “the” in superlative phrase
Change “make a best guess here” to “make the best guess here” for correct usage of a superlative:- We try to make a best guess here + We try to make the best guess here🧰 Tools
🪛 LanguageTool
[grammar] ~148-~148: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...(THE_SUPERLATIVE)
549-563: 🧹 Nitpick (assertive)Remove inline HTML tags in tables
Markdown lint flags<br>in table cells. Refactor these rows to use native Markdown line breaks (two spaces + newline) or separate rows. For example:-| `DeviceActivitySelectionView` | `familyActivitySelection`: string | null `<br>` `onSelectionChange`: (event) => void `<br>` `style`: ViewStyle | Native component... +| `DeviceActivitySelectionView` | +| `familyActivitySelection`: string \| null +| `onSelectionChange`: (event) => void +| `style`: ViewStyle | Native component that renders the app selection UI |Apply similar changes to the Hooks and Functions tables.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
551-551: Inline HTML
Element: br(MD033, no-inline-html)
551-551: Inline HTML
Element: br(MD033, no-inline-html)
557-557: Inline HTML
Element: br(MD033, no-inline-html)
557-557: Inline HTML
Element: br(MD033, no-inline-html)
557-557: Inline HTML
Element: br(MD033, no-inline-html)
557-557: Inline HTML
Element: br(MD033, no-inline-html)
187-187: 🧹 Nitpick (assertive)Add missing comma after “approval”
Clarify the conditional clause by adding a comma:- Once you've gotten approval you need to manually add… + Once you've gotten approval, you need to manually add…🧰 Tools
🪛 LanguageTool
[uncategorized] ~187-~187: Possible missing comma found.
Context: ...ShieldConfiguration Once you've gotten approval you need to manually add the "Family Co...(AI_HYDRA_LEO_MISSING_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
README.md(6 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~148-~148: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...
(THE_SUPERLATIVE)
[uncategorized] ~187-~187: Possible missing comma found.
Context: ...ShieldConfiguration Once you've gotten approval you need to manually add the "Family Co...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~189-~189: Possible missing comma found.
Context: ...omatically.
(AI_HYDRA_LEO_MISSING_COMMA)
🪛 markdownlint-cli2 (0.17.2)
README.md
25-25: Link fragments should be valid
null
(MD051, link-fragments)
35-35: Link fragments should be valid
null
(MD051, link-fragments)
551-551: Inline HTML
Element: br
(MD033, no-inline-html)
551-551: Inline HTML
Element: br
(MD033, no-inline-html)
557-557: Inline HTML
Element: br
(MD033, no-inline-html)
557-557: Inline HTML
Element: br
(MD033, no-inline-html)
557-557: Inline HTML
Element: br
(MD033, no-inline-html)
557-557: Inline HTML
Element: br
(MD033, no-inline-html)
564-564: Inline HTML
Element: br
(MD033, no-inline-html)
564-564: Inline HTML
Element: br
(MD033, no-inline-html)
567-567: Inline HTML
Element: br
(MD033, no-inline-html)
570-570: Inline HTML
Element: br
(MD033, no-inline-html)
|
|
||
| ````typescript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect code fence formatting
The example uses four backticks instead of three, so it won’t render properly. Change:
- ````typescript
+ ```typescriptand close with ``` (three backticks) instead of ````.
🤖 Prompt for AI Agents
In README.md lines 194 to 195, the code fence for the TypeScript example uses
four backticks instead of three, which causes improper rendering. Fix this by
replacing the four backticks with three at the start of the code block and
ensure the closing backticks are also three. This will correctly format the code
block for proper display.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…d adding blank lines for improved readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
README.md (1)
206-209: 🧹 Nitpick (assertive)Normalize code-fence language identifiers
Several fences useTypeScript(capital “T” and “S”). To maintain consistency and better tooling support, use lowercase identifiers (typescriptorts) for all code blocks.
♻️ Duplicate comments (3)
README.md (3)
10-10: Consider moving the warning to a “Prerequisites” section
The important callout on line 10 is buried in the intro. Per a prior suggestion, relocating it into a dedicated “Prerequisites” (or “Before You Begin”) section will improve discoverability and ensure users don’t miss the Apple-approval requirement.
553-563: 🛠️ Refactor suggestionRemove inline HTML
<br>tags in tables
Markdown lint flags the use of<br>in table cells. Replace these with native Markdown line breaks (two spaces + newline) or split into multiple rows. For example:| `DeviceActivitySelectionView` | `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle | … | +| `DeviceActivitySelectionView` | `familyActivitySelection`: string \| null + `onSelectionChange`: (event) => void + `style`: ViewStyle | … |
44-44: 🧹 Nitpick (assertive)Improve punctuation in the “Note” sentence
The line reads:Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
Consider adding a semicolon before “hence” and commas around it, and pluralizing “identifier” for clarity:
- …you might not need all the APIs hence not all the new bundle identifier and capabilities are required. + …you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
README.md(6 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~42-~42: A comma might be missing here.
Context: ...ur use case, you might not need all the APIs hence not all the new bundle identifier...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[grammar] ~148-~148: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...
(THE_SUPERLATIVE)
[uncategorized] ~148-~148: Possible missing comma found.
Context: ...lay a shield specific for the Instagram selection that will take precedence over the less...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~157-~157: The preposition “about” seems more likely in this position.
Context: .... - Event history. Contains information of which events have been triggered and wh...
(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)
[uncategorized] ~176-~176: Possible missing comma found.
Context: ...quires approval from Apple As early as possible you want to [request approval from Appl...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~187-~187: A comma might be missing here.
Context: ...hieldConfiguration` Once you've gotten approval you need to manually add the "Family Co...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
🪛 markdownlint-cli2 (0.17.2)
README.md
25-25: Link fragments should be valid
null
(MD051, link-fragments)
26-26: Link fragments should be valid
null
(MD051, link-fragments)
27-27: Link fragments should be valid
null
(MD051, link-fragments)
28-28: Link fragments should be valid
null
(MD051, link-fragments)
29-29: Link fragments should be valid
null
(MD051, link-fragments)
30-30: Link fragments should be valid
null
(MD051, link-fragments)
31-31: Link fragments should be valid
null
(MD051, link-fragments)
32-32: Link fragments should be valid
null
(MD051, link-fragments)
33-33: Link fragments should be valid
null
(MD051, link-fragments)
34-34: Link fragments should be valid
null
(MD051, link-fragments)
35-35: Link fragments should be valid
null
(MD051, link-fragments)
36-36: Link fragments should be valid
null
(MD051, link-fragments)
| - [Apple's Screen Time APIs Explained](https://developer.apple.com/videos/play/wwdc2021/10123/) | ||
| - [FamilyControl API](#familycontrol-api) | ||
| - [ShieldConfiguration API](#shieldconfiguration-api) | ||
| - [ShieldAction API](#shieldaction-api) | ||
| - [ActivityMonitor API](#activitymonitor-api) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix broken TOC anchors and links
The Table of Contents entries use external URLs or invalid fragment identifiers (e.g., #weird-behaviors-). They should point to internal headings with valid, lowercase, hyphenated anchors (for example: [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)). Please update all TOC links to match the actual section IDs.
Also applies to: 20-36
🤖 Prompt for AI Agents
In README.md lines 14 to 18 and also lines 20 to 36, the Table of Contents links
use external URLs or invalid fragment identifiers that do not match the actual
internal heading IDs. Update all TOC links to use valid, lowercase, hyphenated
anchors that correspond exactly to the internal section headings, for example,
change external URLs to internal anchors like #apples-screen-time-apis-explained
and fix any invalid fragments such as #weird-behaviors- to their correct form.
| ````typescript | ||
| import * as ReactNativeDeviceActivity from "react-native-device-activity"; | ||
|
|
||
| ReactNativeDeviceActivity.revokeAuthorization(); | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct the code fence delimiters
The TypeScript example starts with four backticks (````typescript) but closes with three. This will break rendering. Use three backticks for both start and end:
- ````typescript
+ ```typescript
…
- ```
+ ```🤖 Prompt for AI Agents
In README.md around lines 195 to 200, the TypeScript code block starts with four
backticks but ends with three, causing rendering issues. Change the opening
delimiter to use three backticks followed by "typescript" to match the closing
three backticks, ensuring consistent code fence delimiters for proper
formatting.
Hi there!
Below a suggest way to improve a little bit the documentation, I would love to hear your feedbacks on this!
Many thanks for the lib very useful :)
Summary by CodeRabbit