Skip to content
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

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

dbanksdesign
Copy link
Contributor

@dbanksdesign dbanksdesign commented Nov 28, 2022

Description of changes

  • Updated the storage mock provider to make resumable uploads mimick the behavior of real storage resumable uploads
  • Moved the dev preview banner to the top of the page
  • Changed most examples to 'drop' variation to allow for testing the behavior of dropping and selecting files

Issue #, if available

Description of how you validated changes

Before After
CleanShot.2022-11-28.at.12.48.37.mp4
CleanShot.2022-11-28.at.12.47.43.mp4
CleanShot 2022-11-28 at 12 50 52@2x CleanShot 2022-11-28 at 12 51 04@2x

Checklist

  • PR description included
  • yarn test passes
  • Tests are updated
  • No side effects or sideEffects field updated
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dbanksdesign dbanksdesign requested a review from a team as a code owner November 28, 2022 20:43
@changeset-bot
Copy link

changeset-bot bot commented Nov 28, 2022

⚠️ No Changeset found

Latest commit: 2bdd884

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines -4 to +7
const onError = (event) => {
console.log(event);
const [message, setMessage] = React.useState('');
const onError = (error) => {
setMessage(`${error}`);
Copy link
Contributor Author

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.

Comment on lines 4 to +7
return (
<FileUploader
maxFiles={3}
variation="drop"
Copy link
Contributor Author

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">
Copy link
Contributor Author

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.

Comment on lines +93 to +96
// 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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment 👆

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dbanksdesign dbanksdesign temporarily deployed to ci November 28, 2022 20:59 Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci November 28, 2022 20:59 Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci November 28, 2022 20:59 Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci November 28, 2022 20:59 Inactive
@dbanksdesign dbanksdesign merged commit fa7db24 into fileuploader/main Nov 28, 2022
@dbanksdesign dbanksdesign deleted the fileuploader/docs-fixes branch November 28, 2022 21:44
ErikCH added a commit that referenced this pull request Nov 28, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants