Skip to content

Commit

Permalink
docs: size-related labels in Files screen (#2295)
Browse files Browse the repository at this point in the history
* docs: clarify mfs total size caveat
* refactor: rename to localDatastoreDescription
reducing confusion + forcing fresh translation without historical ones

* refactor: rename to currentLocation
similar, make it more clear the value applies to currently displayed
directory

* docs: add preloadNote
* docs: clarify size value sources
  • Loading branch information
lidel authored Nov 14, 2024
1 parent 40c512b commit 49019d4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 6 additions & 3 deletions public/locales/en/files.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"addByPathModal": {
"title": "Import from IPFS",
"description": "Insert an IPFS path (CID) to import.",
"preloadNote": "NOTE: Imported path is lazy-loaded by default, and will be retrieved on-demand as you browse it. To proactively prefetch imported path to the local Datastore, choose ”Download” from the context menu.",
"importPathPlaceholder": "Path or CID (required)",
"namePlaceholder": "Name (optional)",
"examples": "Examples:"
Expand Down Expand Up @@ -114,9 +115,11 @@
"clickToDismiss": "Click to dismiss",
"clickToCancel": "Click to cancel",
"blocks": "Blocks",
"allBlocks": "All blocks",
"allBlocksDescription": "Total size of blocks on your entire IPFS node; this includes everything in Files, plus all locally pinned items and any temporary cached data",
"filesDescription": "Total size of data in the current directory (if a subdirectory, the size of all data in Files is also displayed)",
"localDatastore": "Local Datastore",
"localDatastoreDescription": "Total size of all blocks currently stored in the Datastore of your IPFS node (“RepoSize” from “ipfs repo stat”). This includes everything in the Files view (MFS), low-level pins, and any recently removed or temporary cached blocks that were not garbage-collected yet.",
"currentLocationRoot": "My Files",
"currentLocation": "Current Location",
"currentLocationDescription": "Total size of the DAG behind the current directory (“CumulativeSize” from “ipfs files stat”). This value includes both local and remote blocks, and could be bigger than the size of your local datastore.",
"pinningQueue": "Pinning queue",
"more": "More",
"files": "Files",
Expand Down
4 changes: 2 additions & 2 deletions src/files/header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Header extends React.Component {
className='fill-teal PendingAnimation' />
</a> }

<BarOption title={t('filesDescription')} text={t('app:terms:files')}>
<BarOption title={t('currentLocationDescription')} text={hasUpperDirectory ? t('currentLocation') : t('currentLocationRoot')}>
{ hasUpperDirectory
? (
<span>
Expand All @@ -82,7 +82,7 @@ class Header extends React.Component {
: size(filesSize) }
</BarOption>

<BarOption title={t('allBlocksDescription')} text={t('allBlocks')}>
<BarOption title={t('localDatastoreDescription')} text={t('localDatastore')}>
{ size(repoSize) }
</BarOption>

Expand Down
4 changes: 4 additions & 0 deletions src/files/modals/add-by-path-modal/AddByPathModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ class AddByPathModal extends React.Component {
name='name'
className='input-reset charcoal ba b--black-20 br1 pa2 mb2 db w-90 center focus-outline'
type='text' />

<div className='mt3 mb3 flex flex-column items-center'>
<p className='mt0 charcoal tl w-90'>{t('addByPathModal.preloadNote')}</p>
</div>
</ModalBody>

<ModalActions>
Expand Down

0 comments on commit 49019d4

Please sign in to comment.