Tom Moor
2c1657c7f2
Merge
2022-07-17 21:55:54 +01:00
Tom Moor
16541560eb
performance
2022-07-17 21:50:45 +01:00
Tom Moor
832eb20a10
Merge branch 'main' of github.com:outline/outline into feat/dropdown-pagination
2022-07-17 21:00:37 +01:00
Jamie Slome and Tom Moor
04f5b08ba1
Update SECURITY.md ( #3711 )
...
* Update SECURITY.md
* Update SECURITY.md
Co-authored-by: Tom Moor <tom.moor@gmail.com >
2022-07-17 07:29:10 -07:00
CuriousCorrelation
5924f4909f
fix: Cursor disappearing behind emoji ( #3786 )
...
* fix: Cursor disappearing behind emoji
* Move emoji node styles to `Styles.ts`
* fix: grammar
* fix: Pasting emoji adds a new line
* fix: DOM element type
2022-07-17 06:49:39 -07:00
CuriousCorrelation
c00bad38e2
feat(editor): Ability to select line in codeblocks ( #3798 )
...
* feat(editor): Ability to select line in codeblocks
* fix: Check to make sure sel is indeed in codeblock
2022-07-17 06:49:30 -07:00
Tom Moor
11e1ef455f
chore: Improve UUID vaildation – prevent nonsense reaching db queries
2022-07-17 14:49:04 +01:00
Tom Moor
501221a038
Styling tweaks
2022-07-17 14:22:37 +01:00
CuriousCorrelation
2f4a9378ce
Change initial load limit to DEFAULT_PAGINATION_LIMIT
2022-07-17 12:22:25 +01:00
CuriousCorrelation
ddab370640
Add ability to search for users
2022-07-17 12:22:25 +01:00
CuriousCorrelation
c01312db24
Add user store fn to get unordered data
...
Getting users via pagination API returns a sorted list.
If we fetch for 3 users, they'll be sorted alphabetically,
next 3 will also be sorted alphabetically.
That means a final list will look like
[a, i, p] + [c, d, f] = [a, c, d, f, i, p]
Final result is unsorted.
At UX level, it looks like jerky dropdown
with users appearing in the middle of the list,
sometimes appearing just as user scrolls past.
`users.unorderedData` fixes that by sending
users consistently, although unsorted.
2022-07-17 12:22:25 +01:00
CuriousCorrelation
f2cffc9354
fix: Typo
2022-07-17 12:22:25 +01:00
CuriousCorrelation
6fbbbcbf87
Revert TFilterOption interface changes
2022-07-17 12:22:25 +01:00
CuriousCorrelation
dad3ea104b
Add docs for else branch
2022-07-17 12:22:25 +01:00
CuriousCorrelation
e1f6fbab7f
Remove test intermediate paginateFetch proxy fn
2022-07-17 12:22:25 +01:00
CuriousCorrelation
efc891d22a
Rename Data suffix to Options for readability
2022-07-17 12:22:25 +01:00
CuriousCorrelation
22ca319d25
Move mount useEffect to top, convention
2022-07-17 12:22:25 +01:00
CuriousCorrelation
e7d96f9257
fix: Search box not filling all space horizontally
2022-07-17 12:22:25 +01:00
CuriousCorrelation
507e6ea926
Update UserFilter paginateFetch def
2022-07-17 12:22:25 +01:00
CuriousCorrelation
5544521524
Remove generic qualifiers (used for testing)
2022-07-17 12:22:25 +01:00
CuriousCorrelation
7a57d8fbf9
Move filteredData to top level for readability
2022-07-17 12:22:25 +01:00
CuriousCorrelation
d119bc65e0
Change options to be generic
...
Now function expects `options` to impl `PaginatedList`
2022-07-17 12:22:25 +01:00
CuriousCorrelation
175e9ca597
Change paginateFetch type
...
`paginateFetch` now has concrete types
2022-07-17 12:22:25 +01:00
CuriousCorrelation
a7fc3494c8
Fix handleFilter dependency
2022-07-17 12:22:25 +01:00
CuriousCorrelation
384259f662
Change searchable to be optional
2022-07-17 12:22:25 +01:00
CuriousCorrelation
b6e5e7ed80
Add filter clear action on blank search
...
This fixes stale search persisting when
clearing search characters.
2022-07-17 12:22:25 +01:00
CuriousCorrelation
a7d5b70440
Update FilterOptions component with new API
2022-07-17 12:22:25 +01:00
CuriousCorrelation
fec7695711
Impl PaginatedItem interface for options
2022-07-17 12:22:25 +01:00
CuriousCorrelation
da1a8287f0
Reduce initial number of user to load
2022-07-17 12:22:25 +01:00
CuriousCorrelation
d3934606e6
Add ability to populate filteredData on mount
2022-07-17 12:22:25 +01:00
CuriousCorrelation
6e9363b551
Fix clicking on menu not clearing previous search
2022-07-17 12:22:25 +01:00
CuriousCorrelation
0926b32957
Add searchable and paginateFetch var
2022-07-17 12:22:25 +01:00
CuriousCorrelation
1b2a5a7ee6
Implement options filter
2022-07-17 12:22:25 +01:00
CuriousCorrelation
6319e54fc0
Add PaginatedItem type req to TFilterOption
...
For use with `PaginatedList`
2022-07-17 12:22:25 +01:00
CuriousCorrelation
b6813272c1
[WIP] Change map with MenuItem to PaginatedList
2022-07-17 12:22:25 +01:00
CuriousCorrelation
0a0946cf12
Add InputSearch styling
2022-07-17 12:22:25 +01:00
CuriousCorrelation
f7d7159805
Remove PaginatedDropdown in favor of merge with FilterOptions
2022-07-17 12:22:24 +01:00
CuriousCorrelation
2fca88f621
Revert UserFilter changes
2022-07-17 12:22:24 +01:00
CuriousCorrelation
2b97a5d593
Made default item component dependency
...
Now parent component can set a default value,
instead of it being hardcoded "Any authors".
2022-07-17 12:22:24 +01:00
CuriousCorrelation
b9e013185d
Fix dropdown button label not setting
2022-07-17 12:22:24 +01:00
CuriousCorrelation
a55b0b3872
Use user.id as PaginatedItem id
2022-07-17 12:22:24 +01:00
CuriousCorrelation
1cf83da73f
Remove onFocus
...
Has no adverse effects so far, fingers crossed
2022-07-17 12:22:24 +01:00
CuriousCorrelation
61d4158d8c
Impl Paginated list
...
Pagination seems to work fine.
`onFocus` isn't useful because
mount is handled already.
TODO: Try removing `onFocus`
2022-07-17 12:22:24 +01:00
CuriousCorrelation
8b70a52114
Add memoized options
...
TODO: Use `options` to create filtered data
2022-07-17 12:22:24 +01:00
CuriousCorrelation
2f7789088a
Add users param to PaginatedDropdown
...
Not sure what `users` type should be.
TODO: Use `users` to calculate `options`
2022-07-17 12:22:24 +01:00
CuriousCorrelation
7c43d937c4
Change PaginatedDropdown to consume user store
...
`PaginatedDropdown` should consume user store directly,
so the pagination and refresh can be encapsulated
into one single component.
TODO: Impl memoized options calculation for
`PaginatedDropdown`
2022-07-17 12:22:24 +01:00
CuriousCorrelation
10daeb41e6
Impl author filter and mount set
...
TODO: Limit user display using pagination.
- Limit user display
- Scroll limited users
- Query for more
Because data would be provided by parent component,
`PaginatedDropdown` might need to use a callback
to fetch additional data.
2022-07-17 12:22:24 +01:00
CuriousCorrelation
d20c6c456e
Add static positioning for search box
...
Now search box doesn't scroll away with the content
TODO: Impl `handleOnChange`
2022-07-17 12:22:24 +01:00
CuriousCorrelation
180a41bd59
Replace FilterOptions with PaginatedDropdown
...
TODO: Make search bar sticky
2022-07-17 12:22:24 +01:00
CuriousCorrelation
fada7032be
Add PaginatedDropdown component
...
Based on `FilterOptions.tsx`
TODO: Replace `FilterOptions` with `PaginatedDropdown`
in `UserFilter.tsx`
2022-07-17 12:22:24 +01:00