Skip to content

Commit

Permalink
docs(extension): improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpatiiuk committed Feb 11, 2024
1 parent e1b851e commit 696057e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 23 deletions.
7 changes: 4 additions & 3 deletions docs/privacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ repository, but the features mentioned above will not be available.
necessary GitHub repository access**. The Extension processes data locally on
your device and only interacts with GitHub's APIs to read from and write to your
specified repository. No data is transmitted to any third-party services, except
for a single network request during authentication as required by GitHub to
resolve the OAuth token (this can not be done client-side due to security
implications).
for
[a single network request during authentication](https://github.com/maxpatiiuk/text-hoarder/tree/main/packages/cors-auth-middleware#readme)
as required by GitHub to resolve the OAuth token (this can not be done
client-side due to security implications).

## No Analytics or Tracking

Expand Down
3 changes: 3 additions & 0 deletions docs/stats/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Text Hoarder Stats

// FIXME: write this
44 changes: 37 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions packages/browser-extension/src/components/Auth/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { AuthContext } from '../Contexts/AuthContext';
import { AuthPrompt } from './AuthPrompt';
import { RepositoryList } from './RepositoryList';
import { urls } from '../../../config';
import { commitText } from '@common/localization/commitText';

const readmeFile = 'README.md';
Expand All @@ -24,10 +23,7 @@ export function EnsureAuthenticated({
?.createFile(
readmeFile,
commitText.initialize,
commitText.readmeContent(
urls.webStoreUrl,
urls.webStoreReviewUrl,
),
commitText.readmeContent,
)
.catch(console.error)
.finally(() => setNeedsSetup(false))
Expand Down
24 changes: 16 additions & 8 deletions packages/common/src/localization/commitText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,38 @@

// Refer to "Guidelines for Programmers" in ./README.md before editing this file

import { readerText } from '@common/localization/readerText';
import { urls } from '../../../browser-extension/config';
import { commonText } from './commonText';
import { dictionary } from './utils';
import { signInText } from '@common/localization/signInText';

/* eslint-disable @typescript-eslint/naming-convention */
export const commitText = dictionary({
// Not using conventional commits as those might look weird to non-techy users
repositoryInitialize: {
en: (documentTitle: string): string =>
`[${commonText.delete}] ${documentTitle}`,
},
initialize: { en: 'Initialize Text Hoarder' },
createFile: { en: (documentTitle: string): string => documentTitle },
readmeContent: {
en: (
webStoreUrl: string,
webStoreReviewUrl: string,
) => `# Text Hoarder Store
en: `# Text Hoarder Store
This repository is used by the [Text Hoarder](${webStoreUrl}) browser extension
This repository is used by the [Text Hoarder](${urls.webStore}) browser extension
for storage of saved snippets of text.
If you are enjoying it, don't forget to [leave a review](${webStoreReviewUrl})
on the Chrome Web Store!
Did you know that Text Hoarder can compute fancy stats from the articles you
save? [See a guide](${urls.statsDocs}).
// FINAL: improve this
If you are enjoying Text Hoarder, don't forget to
[leave a review](${urls.webStoreReview}) on the Chrome Web Store!
Helpful links:
- [${readerText.requestFeature}](${urls.requestFeature})
- [${readerText.reportIssue}](${urls.reportIssue})
- [${readerText.sourceCode}](${urls.sourceCode})
- [${signInText.privacyPolicy}](${urls.privacyPolicy})
`,
},
});
Expand Down

0 comments on commit 696057e

Please sign in to comment.