-
Notifications
You must be signed in to change notification settings - Fork 314
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
chore(docs): fileuploader docs updates #3097
Conversation
|
const onError = (event) => { | ||
console.log(event); | ||
const [message, setMessage] = React.useState(''); | ||
const onError = (error) => { | ||
setMessage(`${error}`); |
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.
Changing this to show the message in the example so users don't need to open the console to see the effect.
return ( | ||
<FileUploader | ||
maxFiles={3} | ||
variation="drop" |
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.
Changing most of these examples to use the drop variation. This allows users and us to test the behavior of dropping files as well as opening the file browser.
@@ -7,22 +7,20 @@ FileUploaderComponentsExample, LevelExample, IsPreviewerVisibleExample, Variatio | |||
MaxSizeExample, MultipleExample, ResumableExample, ShowImagesExample, FileUploaderSuccessExample, PreviewerComponentsExample, TrackerComponentsExample, UploadButtonComponentsExample } from './examples' | |||
import { ReactPropsTable } from '../../in-app-messaging/props' | |||
|
|||
<Alert role="none" heading="Wait!"> | |||
Did you follow the [quick start instructions](/connected-components/storage#quick-start) to set up the storage and auth services? | |||
<Alert variation="info" heading="Developer Preview"> |
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.
Git diff is weird here, moved the dev preview alert to the top, and the setup alert to under the Overview section.
// Resumable uploads files in chunks rather than streaming | ||
// this will make the progress go in 4 chunks of 25% | ||
tick = tickCreator(null, 25); | ||
interval = setInterval(tick, delay); |
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.
See 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.
👍
* Added new overrides for Previewer and Tracker * Added new turn off previewer image * fix(dependabot): Add resolutions for immer and ejs (#2985) * Added new autoproceed prop * fix(button): Fix loading state for Button (#2964) * Fixed prop * Added null * Added cleanup pr for console warning * fix(ui-react): Update useDataStore hook predicate generation logic (#3000) * Version Packages (#2991) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Added new TOC for docs * Added more examples * Added test and updated logger * refactor(docs): props table to not generate .mdx (#2997) * refactor(docs): generate props table data * fix(docs): props table remove sanitizer * fix(docs): props table add code highlight * chore(docs): convert Markdown Description to HTML * chore(docs): props table sort props order, refactor PropsTableTab * chore(docs): props table heading link and required badge * refactor(docs): delete props-table.mdx and use PropsTableTab component * chore(docs): props table optimize required badge * chore(docs): props table update table data * chore(docs): props table refactor data to use map so that the order is more stable * test(docs): add props table data snapshot test * chore(docs): update README * Update docs/src/components/propsTable/PropsTableBody.tsx Co-authored-by: Heather Buchel <hbuchel@gmail.com> * Update docs/src/components/propsTable/PropsTableTab.tsx Co-authored-by: Heather Buchel <hbuchel@gmail.com> * feat(docs): props table css copy from PR2435 * chore(docs): remove props-table-data.json * chore(docs): gitignore props-table.json * chore(docs): props table mdnUrl * chore(docs): props table replace p with View * refactor(docs): use react-markdown * refactor(docs): use Text to replace View as p * chore(docs): props table add placeholder * fix: props table expander focus style (#3006) Co-authored-by: Heather Buchel <buchel@amazon.com> Co-authored-by: 0618 <o.6180339@gmail.com> Co-authored-by: Heather Buchel <hbuchel@gmail.com> Co-authored-by: Heather Buchel <buchel@amazon.com> * refactor(docs): remove numberOfPages from broken link test (#2945) * refactor(docs): remove numberOfPages from broken link test * fix(docs): broken link test refactor hrefWorks * Revert "fix(docs): broken link test refactor hrefWorks" This reverts commit 120c0fe. * chore(docs): add comments for broken link test * feat(docs): link checker add param * chore(docs): cypress test disable video * refactor(docs): link checker cy.get internal and external links Co-authored-by: 0618 <o.6180339@gmail.com> * build(deps): bump deep-object-diff from 1.1.7 to 1.1.9 (#3003) Bumps [deep-object-diff](https://github.com/mattphillips/deep-object-diff) from 1.1.7 to 1.1.9. - [Release notes](https://github.com/mattphillips/deep-object-diff/releases) - [Commits](https://github.com/mattphillips/deep-object-diff/commits) --- updated-dependencies: - dependency-name: deep-object-diff dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Updated from code review * feat(angular): expose `subscribe` to subscribe for auth changes (#2817) * subscribe now exposes facade values * Add changeset * Update return type * Unit test! * change test name * perf: store facade values directly * Update unit test * Minor optimization * Inline mock service * Don't return unsubscribe directly * Update .changeset/smooth-moons-occur.md * Update .changeset/smooth-moons-occur.md * Fix unit test * Docs migration fix (#3014) * Fixed test * Added props * updated links * fix: fix autocomplete demo bug and bump menu z-index (#3013) * fix: fix autocomplete demo bug and bump menu z-index * Create tame-drinks-check.md * fix: fix autocomplete display * chore: remove unused variable * Update tame-drinks-check.md * feat(rna): React Native Authenticator (#3017) Co-authored-by: wlee221 <willeea@amazon.com> Co-authored-by: Ioana Brooks <68251134+ioanabrooks@users.noreply.github.com> Co-authored-by: Joe Buono <joebuono@amazon.com> Co-authored-by: Danny Banks <djb@amazon.com> * chore(ui): add csstype devDep to ui package (#3024) * chore(ui-react-native): Update RNA theme support (#3025) * chore(rna): update TextField style (#3022) * chore(ui-react-core): remove react dom peerDep from ui-react-core (#3026) * rna(chore): update DefaultContent, migrate SignUp (#3023) * chore: update Autocomplete filter to be case insensitive (#3019) * chore: update filter to be case insensitive * Create grumpy-apricots-sparkle.md * chore(rna): remove copy button from SetupTOTP (#3018) * fix(Autocomplete): remove handler to open menu on focus (#3033) * fix(Autocomplete): remove handler to open menu on focus * Create good-donuts-obey.md * chore: fix test * chore(ui-react-native): omit checkbox from themed Components (#3034) * chore(ui-react-native): Handle dial codes (#3020) (#3032) Co-authored-by: Ioana Brooks <68251134+ioanabrooks@users.noreply.github.com> * chore(rna): refactor DefaultContainer (#3036) * Updated based on comments * chore(ui-react-native): Migrate RNA subcomponents to use DefaultContent (#3031) * fix(ci): move csstypes to deps (#3038) * Fixed test for uploader * Renamed isSuccess prop * Renamed resumable to isResumable * renamed shouldAutoProceed * Renamed multiple to hasMultipleFiles * feat(rna): adding default dark mode export (#3039) * Removed ref for hiddenInput * Updated from code review * feat(rna): add top level component slots (#3040) * Removed ref from file uploader component * chore(ui-react-native): Fix accessibility audit issues (#3042) * chore(rna): add labelHidden support and example apps (#3043) * Updated from code review * Update variable names, added string literals, refactored some util functions * Removed comments * deleting un-needed variable * chore(ui-react-native): SetupTOTP small fixes (#3048) * chore(rna): remove picker dep (#3057) * chore(rna); remove socialProviders props (#3064) * fix(rna): expose validationErrors, style errors (#3063) * chore: Add RNA changeset (#3067) * add RNA changeset * update changeset Co-authored-by: Joe Buono <joebuono@amazon.com> * Fixed test * chore(docs): Add RNA pages to docs site (#3041) Co-authored-by: Joe Buono <joebuono@amazon.com> Co-authored-by: Caleb Pollman <cpollman@amazon.com> Co-authored-by: Sreeram Sama <12038441+sreeramsama@users.noreply.github.com> Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com> Co-authored-by: MJ Zhang <0618@users.noreply.github.com> Co-authored-by: 0618 <o.6180339@gmail.com> Co-authored-by: Danny Banks <djb@amazon.com> * Moved from ref to useState * updated key for uploader * Version Packages (#3015) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(docs): fix typos on react native authenticator docs (#3068) * fix(docs): hash link start with number (#3069) Co-authored-by: 0618 <o.6180339@gmail.com> * Fixed bugs * fixed tests * Updated error in translation * Fixed test * fix(theme): update types for ThemeProvider to accept output of createTheme (#3071) * Fixed rendering issue * Version Packages (#3073) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Fixed percentage and other code review comments * Removed progesscallback * fixed isCancelEdit, updateEditStatus, and isDeterminate variable * build(deps): bump engine.io from 6.2.0 to 6.2.1 (#3059) Bumps [engine.io](https://github.com/socketio/engine.io) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/socketio/engine.io/releases) - [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md) - [Commits](socketio/engine.io@6.2.0...6.2.1) --- updated-dependencies: - dependency-name: engine.io dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: fixing RN tests * updated snapshot * upgrade loader-utils from 2.0.3 to 2.0.4 (#3079) Co-authored-by: Joe Buono <joebuono@amazon.com> * chore(ui): Add export dist/styles.css to fix missing export error * Adding export dist/styles.css to fix missing export error. See issue 2999. * Add missing comma * Create dirty-ladybugs-yell.md Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com> * Updated components based on refactor from Caleb * Created util function for valid extension * Moved isValidExtension to utils * Fixed tests * Cleaned up types * Deleted UploadButton * Added changeset * added storage keys * Fixed tests * fix(docs): remove unsupported link from rna docs (#3090) * Added new storage environment (#3096) Co-authored-by: Erik Hanchett <ehhanche@amazon.com> * Retrigger cicd * chore(docs): fileuploader docs updates (#3097) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Erik Hanchett <ehhanche@amazon.com> Co-authored-by: Ioana Brooks <68251134+ioanabrooks@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: MJ Zhang <0618@users.noreply.github.com> Co-authored-by: 0618 <o.6180339@gmail.com> Co-authored-by: Heather Buchel <hbuchel@gmail.com> Co-authored-by: Heather Buchel <buchel@amazon.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: William Lee <43682783+wlee221@users.noreply.github.com> Co-authored-by: Danny Banks <djb@amazon.com> Co-authored-by: Chenwei Zhang <40295569+zchenwei@users.noreply.github.com> Co-authored-by: Caleb Pollman <cpollman@amazon.com> Co-authored-by: wlee221 <willeea@amazon.com> Co-authored-by: Joe Buono <joebuono@amazon.com> Co-authored-by: Joe Buono <joebuono724@gmail.com> Co-authored-by: Sreeram Sama <12038441+sreeramsama@users.noreply.github.com> Co-authored-by: Pascal Kraft <35356122+SilverLinings89@users.noreply.github.com>
Description of changes
Issue #, if available
Description of how you validated changes
CleanShot.2022-11-28.at.12.48.37.mp4
CleanShot.2022-11-28.at.12.47.43.mp4
Checklist
yarn test
passessideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.