add hosting to first run #7598

Merged
jessopb merged 8 commits from feat-autoHosting-and-firstRun into master 2022-06-02 21:24:11 +02:00
4 changed files with 53 additions and 24 deletions
Showing only changes of commit c5c4d7ebf1 - Show all commits

View file

@ -1,5 +1,6 @@
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
// @flow // @flow
import * as React from 'react'; import * as React from 'react';
import I18nMessage from 'component/i18nMessage';
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
type Props = { type Props = {
// --- select --- // --- select ---
@ -18,7 +19,7 @@ function StorageViz(props: Props) {
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
return ( return (
<div className={'storage__wrapper'}> <div className={'storage__wrapper'}>
<div className={'storage__bar'}> <div className={'storage__bar'}>
<div className="help">Cannot get disk space information.</div> <div className="help">{__('Cannot get disk space information.')}</div>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
</div> </div>
</div> </div>
); );
@ -64,29 +65,57 @@ function StorageViz(props: Props) {
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<div className={'storage__legend-item'}> <div className={'storage__legend-item'}>
<div className={'storage__legend-item-swatch storage__legend-item-swatch--private'} /> <div className={'storage__legend-item-swatch storage__legend-item-swatch--private'} />
<div className={'storage__legend-item-label'}> <div className={'storage__legend-item-label'}>
<label>Publishes</label> <label>{__('Publishes --[legend, storage category]--')}</label>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<div className={'help'}>{`${getGB(privateBlobSpace)} GB`}</div> <div className={'help'}>{`${getGB(privateBlobSpace)} GB`}</div>
</div> </div>
</div> </div>
<div className={'storage__legend-item'}> <div className={'storage__legend-item'}>
<div className={'storage__legend-item-swatch storage__legend-item-swatch--auto'} /> <div className={'storage__legend-item-swatch storage__legend-item-swatch--auto'} />
<div className={'storage__legend-item-label'}> <div className={'storage__legend-item-label'}>
<label>Auto Hosting</label> <label>{__('Auto Hosting --[legend, storage category]--')}</label>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<div className={'help'}> <div className={'help'}>
{autoHostingLimit === 0 ? __('Disabled') : `${getGB(autoBlobSpace)} of ${getGB(autoHostingLimit)} GB`} {autoHostingLimit === 0 ? (
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
__('Disabled')
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
) : (
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<I18nMessage
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
tokens={{
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
spaceUsed: getGB(autoBlobSpace),
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
limit: getGB(autoHostingLimit),
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
}}
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
%spaceUsed% of %limit% GB
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
</I18nMessage>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
)}
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
{
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<I18nMessage
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
tokens={{
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
spaceUsed: getGB(viewBlobSpace),
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
limit: viewHostingLimit !== 0 ? getGB(viewHostingLimit) : getGB(viewFree),
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
}}
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
%spaceUsed% of %limit% Free GB
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
</I18nMessage>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
}
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
</div> </div>
</div> </div>
</div> </div>
<div className={'storage__legend-item'}> <div className={'storage__legend-item'}>
<div className={'storage__legend-item-swatch storage__legend-item-swatch--viewed'} /> <div className={'storage__legend-item-swatch storage__legend-item-swatch--viewed'} />
<div className={'storage__legend-item-label'}> <div className={'storage__legend-item-label'}>
<label>View Hosting</label> <label>{__('View Hosting --[legend, storage category]--')}</label>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<div className={'help'}> <div className={'help'}>
{viewHostingLimit === 1 {viewHostingLimit === 1 ? (
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
? __('Disabled') __('Disabled')
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
: `${getGB(viewBlobSpace)} of ${ ) : (
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
viewHostingLimit !== 0 ? getGB(viewHostingLimit) : `${getGB(viewFree)} Free` <I18nMessage
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
} GB`} tokens={{
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
spaceUsed: getGB(viewBlobSpace),
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
limit: viewHostingLimit !== 0 ? getGB(viewHostingLimit) : getGB(viewFree),
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
}}
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
%spaceUsed% of %limit% Free GB
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
</I18nMessage>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
)}
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
</div> </div>
</div> </div>
</div> </div>
@ -94,7 +123,7 @@ function StorageViz(props: Props) {
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<div className={'storage__legend-item'}> <div className={'storage__legend-item'}>
<div className={'storage__legend-item-swatch storage__legend-item-swatch--free'} /> <div className={'storage__legend-item-swatch storage__legend-item-swatch--free'} />
<div className={'storage__legend-item-label'}> <div className={'storage__legend-item-label'}>
<label>Free</label> <label>{__('Free --[legend, unused disk space]--')}</label>
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
<div className={'help'}>{`${getGB(unallocFree)} GB`}</div> <div className={'help'}>{`${getGB(unallocFree)} GB`}</div>
</div> </div>
</div> </div>

kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places
kauffj commented 2022-06-02 18:50:16 +02:00 (Migrated from github.com)
Review

Missing i18n in several places

Missing i18n in several places

View file

@ -13,15 +13,11 @@ type Props = {
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
function HostingSplashCustom(props: Props) { function HostingSplashCustom(props: Props) {
const { handleNextPage, handleGoBack } = props; const { handleNextPage, handleGoBack } = props;
function handleSubmit() {
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
handleNextPage();
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
}
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
return ( return (
<section className="main--contained"> <section className="main--contained">
<div className={'first-run__wrapper'}> <div className={'first-run__wrapper'}>
<SettingStorage isWelcome /> <SettingStorage isWelcome />
<Form onSubmit={handleSubmit} className="section__body"> <Form onSubmit={handleNextPage} className="section__body">
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
<div className={'card__actions'}> <div className={'card__actions'}>
<Button button="primary" label={__(`Let's go`)} type="submit" /> <Button button="primary" label={__(`Let's go`)} type="submit" />
<Button button="link" label={__(`Go back`)} onClick={handleGoBack} /> <Button button="link" label={__(`Go back`)} onClick={handleGoBack} />

kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function
kauffj commented 2022-06-02 18:51:30 +02:00 (Migrated from github.com)
Review

unnecessary function

unnecessary function

View file

@ -53,7 +53,7 @@ export default function SettingStorage(props: Props) {
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
title={__('Enable Data Hosting')} title={__('Enable Data Hosting')}
subtitle={ subtitle={
<React.Fragment> <React.Fragment>
{__('Help improve the P2P data network (and make LBRY happy) by hosting data.')}{' '} {__('Help improve the P2P data network (and make LBRY users happy) by hosting data.')}
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
</React.Fragment> </React.Fragment>
} }
footer={<AppStorageViz />} footer={<AppStorageViz />}
@ -66,7 +66,7 @@ export default function SettingStorage(props: Props) {
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
disabled={!saveBlobs} disabled={!saveBlobs}
subtitle={ subtitle={
<React.Fragment> <React.Fragment>
{__("View History Hosting lets you choose how much storage to use helping content you've consumed.")}{' '} {__("View History Hosting lets you choose how much storage to use hosting content you've consumed.")}{' '}
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
<Button button="link" label={__('Learn more')} href="https://lbry.com/faq/host-content" /> <Button button="link" label={__('Learn more')} href="https://lbry.com/faq/host-content" />
</React.Fragment> </React.Fragment>
} }
@ -79,7 +79,7 @@ export default function SettingStorage(props: Props) {
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
disabled={!saveBlobs} disabled={!saveBlobs}
subtitle={ subtitle={
<React.Fragment> <React.Fragment>
{__('Automatic Hosting downloads a small slice of content currently active on the network.')}{' '} {__('Automatic Hosting downloads a small portion of content active on the network.')}{' '}
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
<Button button="link" label={__('Learn more')} href="https://lbry.com/faq/host-content" /> <Button button="link" label={__('Learn more')} href="https://lbry.com/faq/host-content" />
</React.Fragment> </React.Fragment>
} }

kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"
kauffj commented 2022-06-02 18:53:27 +02:00 (Migrated from github.com)
Review

make LBRY users happy

make LBRY users happy
kauffj commented 2022-06-02 18:53:43 +02:00 (Migrated from github.com)
Review

helping -> hosting (?)

helping -> hosting (?)
kauffj commented 2022-06-02 18:54:11 +02:00 (Migrated from github.com)
Review

slice -> portion

drop "currently"

slice -> portion drop "currently"

View file

@ -24,6 +24,10 @@ type Props = {
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
diskSpace: DiskSpace, diskSpace: DiskSpace,
}; };
const TWENTY_PERCENT = 0.2;
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
const TEN_PERCENT = 0.1;
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
const MINIMUM_VIEW_SETTING = '0.01';
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
function SettingViewHosting(props: Props) { function SettingViewHosting(props: Props) {
const { const {
diskSpace, diskSpace,
@ -41,8 +45,8 @@ function SettingViewHosting(props: Props) {
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
const freeMB = diskSpace && Math.floor(Number(diskSpace.free) / 1024); const freeMB = diskSpace && Math.floor(Number(diskSpace.free) / 1024);
const getGB = (val) => (Number(val) / 1024).toFixed(2); const getGB = (val) => (Number(val) / 1024).toFixed(2);
const recommendedSpace = const recommendedSpace =
freeMB > totalMB * 0.2 // plenty of space? freeMB > totalMB * TWENTY_PERCENT // plenty of space?
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
? Math.ceil(Number(getGB(totalMB * 0.1))) // 10% of total ? Math.ceil(Number(getGB(totalMB * TEN_PERCENT))) // 10% of total
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
: Math.ceil(Number(getGB(viewBlobSpace))); // current amount to avoid deleting : Math.ceil(Number(getGB(viewBlobSpace))); // current amount to avoid deleting
// daemon settings come in as 'number', but we manage them as 'String'. // daemon settings come in as 'number', but we manage them as 'String'.
const [contentBlobSpaceLimitGB, setContentBlobSpaceLimit] = React.useState( const [contentBlobSpaceLimitGB, setContentBlobSpaceLimit] = React.useState(
@ -55,7 +59,7 @@ function SettingViewHosting(props: Props) {
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
if (gb === '') { if (gb === '') {
setContentBlobSpaceLimit(''); setContentBlobSpaceLimit('');
} else if (gb === '0') { } else if (gb === '0') {
setContentBlobSpaceLimit('0.01'); // setting 0 means unlimited. setContentBlobSpaceLimit(MINIMUM_VIEW_SETTING); // setting 0 means unlimited.
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
} else { } else {
if (isTrulyANumber(Number(gb))) { if (isTrulyANumber(Number(gb))) {
setContentBlobSpaceLimit(gb); setContentBlobSpaceLimit(gb);
@ -69,7 +73,7 @@ function SettingViewHosting(props: Props) {
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
} else { } else {
await setDaemonSetting( await setDaemonSetting(
DAEMON_SETTINGS.BLOB_STORAGE_LIMIT_MB, DAEMON_SETTINGS.BLOB_STORAGE_LIMIT_MB,
String(contentBlobSpaceLimitGB === '0.01' ? '1' : convertGbToMbStr(contentBlobSpaceLimitGB)) contentBlobSpaceLimitGB === MINIMUM_VIEW_SETTING ? '1' : convertGbToMbStr(contentBlobSpaceLimitGB)
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
); );
} }
await cleanBlobs(); await cleanBlobs();
@ -152,7 +156,7 @@ function SettingViewHosting(props: Props) {
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
onWheel={(e) => e.preventDefault()} onWheel={(e) => e.preventDefault()}
label={__(`View Hosting Limit (GB)`)} label={__(`View Hosting Limit (GB)`)}
onChange={(e) => handleContentLimitChange(e.target.value)} onChange={(e) => handleContentLimitChange(e.target.value)}
value={Number(contentBlobSpaceLimitGB) <= Number('0.01') ? '0' : contentBlobSpaceLimitGB} value={Number(contentBlobSpaceLimitGB) <= Number(MINIMUM_VIEW_SETTING) ? '0' : contentBlobSpaceLimitGB}
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
/> />
</div> </div>
</> </>

kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction
kauffj commented 2022-06-02 18:56:00 +02:00 (Migrated from github.com)
Review

what's 0.2?

(I know, but variable would make this clearer)

what's 0.2? (I know, but variable would make this clearer)
kauffj commented 2022-06-02 18:56:27 +02:00 (Migrated from github.com)
Review

if 0.01 is special value it probably merits abstraction

if 0.01 is special value it probably merits abstraction