Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add `useCombobox` hook, extending `@github/combobox-nav` * Add `useSyntheticChange` hook * Add `InlineAutocomplete` component * Refactor and improve comments * Remove extra type * Add story and make it work with `FormControl` * Add to main exports * Add MDX file * Remove unecessary ID on textarea in story * Remove version-lock from new dependencies * Make type of render function more specific * Add unit tests * Simplify `useCombobox` and use `navigate` to focus first item Fixes not having an `aria-activedescendant` initially defined * Fix tests by wrapping `userEvent.type` in `act` * Fix preventing blur when tabbing from loading state * Delete unused imports * Change interfaces out for object types * Add accessible live status message to describe suggestions * Dynamically assign the combobox role to avoid treating the textarea as a combobox when no suggestions are available * Shorten & revise status message * Add `MarkdownViewer` component * Move to drafts * Add markdown viewer export to drafts * Move docs to drafts * Fix import in docs * Add markdown viewer doc page * Add `useUnifiedFileSelect` hook * Add `useIgnoreKeyboardActionsWhileComposing` hook * Improve the `useCombinedRefs` hook * Make file types optional in `useUnifiedFileSelect` * Export `SyntheticChangeEmitter` * Move character coordinates calculator to utils (from `InlineAutocomplete`) * Add `useDynamicTextareaHeight` hook * Update `resizeObserver` to support other elements * Add `MarkdownEditor` component * Fix dynamic height calculation when no line-height is set * Add a story for `MarkdownEditor` * Add `MarkdownEditor/index.ts` file * Move markdown builders into utils file * Add inline suggestions to story * Update combobox-nav dependency * Add option to control whether `Tab` key inserts suggestions * Style the defaulted-to first option differently from the selected option * Improve labelling * Change 'entity' for 'mentionable' naming * Accept `ReactNode` for `label` * Fade out the hint link when disabled * Improve story * Fix lint issues in MarkdownViewer tests * Allow custom toolbar using declarative API * Fix infinite rendering bug * Assign displayNames to public components * Replace `actionButtons` prop with a slots-based API * Rename describedBy to aria-describedby * Move label to slots-based API * Add display name for label * Refactor and optimize * Add documentation for subcomponents * Make file upload support optional * Add to drafts exports Co-authored-by: Luke Ghenco <lukeghenco@github.com> * Update src/MarkdownEditor/index.ts Co-authored-by: Luke Ghenco <lukeghenco@github.com> * Update combobox-nav dependency * Fix isMacOS calls breaking tests * Fix toolbar button aria-labels * Add another story * Fix fallback toolbar * Add initial batch of tests * Upgrade `userEvent` to v14 * Fix Autocomplete tests * Update userEvent and fix remaining tests * Add indenting tests * Add file upload tests * Add useSafeAsyncCallback hook * Improve the `useCombinedRefs` hook * Remove unused import * Add `useCombinedRefs` to hooks index * Change createSlots to use layout effects instead of regular effects * Fix tests and lint errors * Add demo and test for file failing to upload * Add tests for previewing and fix bug with controlled view mode * Make `InputLabel` work as `legend` and have correct stricter props * Remove forwarded refs from `MarkdownEditor.Label` * Add tests for basic props and config * Add accessible labelling tests & fix tests around refs and disabling * Add tests and a story for suggestions * Add support for saved replies 🎉 * Bake suggestions filtering into the component using fuzzy matching * Update and fix unit tests * Remove unused import (fix lint error) * Add `MarkdownEditor` docs * docs: add drafts metastring * Remove `selectionVariant` from suggestions list * Add `install:docs` script * Add more examples to docs * Add more stories * Fix _another_ bug with the caret-coordinates utility and single-line inputs 🙃 * Move component & hooks to drafts folder * Move stories & tests into drafts * Remove non-null assertions in tests * Move `textarea-caret` type declaration to `@types` * Add props table * Fix TS issue * Create cuddly-bags-sort.md * Update imports * Move changes into `drafts` directory * Format * Fix lint errors * Update useListInteraction to use a tracking ref * Replace`useCombinedRefs` in `MarkdownInput` * Improve `useSafeAsyncCallback` * Add `MarkdownViewer` stories * Fix documentation * Add changeset * Fix `useIgnoreKeyboardActionsWhileComposing` tests * Fix markdown-toolbar-element initialization * Fix remaining test cases * Remove console.error * Update changeset * Move character coordinates utils to drafts Co-authored-by: Luke Ghenco <lukeghenco@github.com> Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
- Loading branch information