Page MenuHomePhabricator
Feed Advanced Search

Dec 15 2022

przemek updated the diff for D5818: [web] Additional state required for keyboard support for typeahead..

Addressed comments

Dec 15 2022, 1:31 AM

Dec 13 2022

przemek added inline comments to D5818: [web] Additional state required for keyboard support for typeahead..
Dec 13 2022, 2:19 AM
przemek updated the diff for D5818: [web] Additional state required for keyboard support for typeahead..

Responded to inlines and fixed code.

Dec 13 2022, 2:18 AM
przemek updated the test plan for D5850: [web] Introducing keyboard support for typeahead.
Dec 13 2022, 2:05 AM
przemek attached a referenced file: F282546: Screen Recording 2022-12-09 at 19.18.07.mov.
Dec 13 2022, 2:04 AM
przemek updated the test plan for D5850: [web] Introducing keyboard support for typeahead.
Dec 13 2022, 2:04 AM

Dec 9 2022

przemek requested review of D5850: [web] Introducing keyboard support for typeahead.
Dec 9 2022, 10:35 AM
przemek retitled D5819: [web] Add other <button> props to Button. from [web] Add onMouseMove to Button. to [web] Add other <button> props to Button..
Dec 9 2022, 10:25 AM
przemek updated the diff for D5818: [web] Additional state required for keyboard support for typeahead..

Idea changed a bit. Now all state regarding typeahead overlay is gatherd in one object.
It will keep callback accept and close so they can be called outside of overlay to perform actions on it.

Dec 9 2022, 10:16 AM
przemek updated the diff for D5819: [web] Add other <button> props to Button..

Sorry, morning brain fart.
Yeah, disabled doesn't need to be there.

Dec 9 2022, 2:12 AM
przemek added inline comments to D5819: [web] Add other <button> props to Button..
Dec 9 2022, 2:08 AM
przemek updated the diff for D5819: [web] Add other <button> props to Button..

Using classNames.

Dec 9 2022, 2:08 AM

Dec 7 2022

przemek added inline comments to D5819: [web] Add other <button> props to Button..
Dec 7 2022, 9:22 AM
przemek updated the diff for D5819: [web] Add other <button> props to Button..

As @ashoat suggested, I added all <button> props.

Dec 7 2022, 9:20 AM
przemek added inline comments to D5819: [web] Add other <button> props to Button..
Dec 7 2022, 7:19 AM

Dec 6 2022

przemek updated the summary of D5819: [web] Add other <button> props to Button..
Dec 6 2022, 3:56 AM
przemek retitled D5819: [web] Add other <button> props to Button. from [web] Add onMouseOver to Button. to [web] Add onMouseMove to Button..
Dec 6 2022, 3:56 AM
przemek updated the diff for D5819: [web] Add other <button> props to Button..

Changed mouseOver to mouseMove so it triggers correctly.
It begs a questions whether I should even try to use generic Component and not plain html tag, if use case is so custom.

Dec 6 2022, 3:56 AM
przemek planned changes to D5819: [web] Add other <button> props to Button..
Dec 6 2022, 2:56 AM
przemek requested review of D5819: [web] Add other <button> props to Button..
Dec 6 2022, 2:39 AM
przemek requested review of D5818: [web] Additional state required for keyboard support for typeahead..
Dec 6 2022, 2:31 AM

Dec 4 2022

przemek closed D5800: [web] Deleted unused file.
Dec 4 2022, 1:48 AM
przemek committed rCOMM5f0201490391: [web] Deleted unused file (authored by przemek).
[web] Deleted unused file
Dec 4 2022, 1:48 AM

Dec 2 2022

przemek requested review of D5800: [web] Deleted unused file.
Dec 2 2022, 3:03 AM

Dec 1 2022

przemek closed D5756: [Fix] Swapped deprecated keyCode to key..
Dec 1 2022, 2:44 AM
przemek committed rCOMMe47747b8327d: [Fix] Swapped deprecated keyCode to key. (authored by przemek).
[Fix] Swapped deprecated keyCode to key.
Dec 1 2022, 2:44 AM
przemek updated the diff for D5756: [Fix] Swapped deprecated keyCode to key..

deleted comment

Dec 1 2022, 2:06 AM

Nov 29 2022

przemek requested review of D5757: [web] Change names from Mention/Mention suggestion to Typeahead.
Nov 29 2022, 9:45 AM
przemek requested review of D5756: [Fix] Swapped deprecated keyCode to key..
Nov 29 2022, 9:04 AM
przemek closed D5726: [web] Added on enter animation for typeahead overlay..
Nov 29 2022, 6:27 AM
przemek closed D5722: [web] Creating typeahead overlay in ChatInputbar.
Nov 29 2022, 6:27 AM
przemek committed rCOMMfd77f5bcf28a: [web] Added on enter animation for typeahead overlay. (authored by przemek).
[web] Added on enter animation for typeahead overlay.
Nov 29 2022, 6:27 AM
przemek closed D5720: [web] Calling utility functions in Overlay component..
Nov 29 2022, 6:27 AM
przemek committed rCOMMa20f02f5e88f: [web] Calling utility functions in Overlay component. (authored by przemek).
[web] Calling utility functions in Overlay component.
Nov 29 2022, 6:27 AM
przemek committed rCOMM5733c93e9989: [web] Creating typeahead overlay in ChatInputbar (authored by przemek).
[web] Creating typeahead overlay in ChatInputbar
Nov 29 2022, 6:27 AM
przemek closed D5719: [web] Added more utility functions for typeahead..
Nov 29 2022, 6:26 AM
przemek closed D5717: [web] Moved typeahead utils to `web/chat`.
Nov 29 2022, 6:26 AM
przemek committed rCOMMd828ba3f1641: [web] Added more utility functions for typeahead. (authored by przemek).
[web] Added more utility functions for typeahead.
Nov 29 2022, 6:26 AM
przemek committed rCOMMe46ae0ec20c2: [web] Moved typeahead utils to `web/chat` (authored by przemek).
[web] Moved typeahead utils to `web/chat`
Nov 29 2022, 6:26 AM
przemek closed D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..
Nov 29 2022, 6:26 AM
przemek committed rCOMMb5e057733351: [lib] Added getTextsOffsets function. Refactored mention-utils.js. (authored by przemek).
[lib] Added getTextsOffsets function. Refactored mention-utils.js.
Nov 29 2022, 6:26 AM
przemek added inline comments to D5722: [web] Creating typeahead overlay in ChatInputbar.
Nov 29 2022, 6:07 AM
przemek updated the diff for D5722: [web] Creating typeahead overlay in ChatInputbar.

Fixed readonlys

Nov 29 2022, 6:06 AM
przemek closed D5724: [web] Fixed visual bug with disappearing buttons.
Nov 29 2022, 3:26 AM
przemek committed rCOMMbffe6fdccff5: [web] Fixed visual bug with disappearing buttons (authored by przemek).
[web] Fixed visual bug with disappearing buttons
Nov 29 2022, 3:26 AM
przemek added inline comments to D5722: [web] Creating typeahead overlay in ChatInputbar.
Nov 29 2022, 3:25 AM
przemek updated the diff for D5722: [web] Creating typeahead overlay in ChatInputbar.

Responded to suggestions.

Nov 29 2022, 3:24 AM
przemek updated the diff for D5719: [web] Added more utility functions for typeahead..

Responded to suggestions.

Nov 29 2022, 2:53 AM
przemek updated the diff for D5724: [web] Fixed visual bug with disappearing buttons.

We can't use flex: 1, as it sets flex-basis: 0%, and apparently we need some explicit pixel value.
I set it to flex-basis: 120px, so it can never be shrinked to size shorter then two elements.
Should rarely happen, as nobody expects webpage to wrok propery with 300px of window height.

Nov 29 2022, 2:44 AM

Nov 25 2022

przemek added inline comments to D5724: [web] Fixed visual bug with disappearing buttons.
Nov 25 2022, 9:27 AM
przemek added 1 blocking reviewer(s) for D5724: [web] Fixed visual bug with disappearing buttons: tomek.
Nov 25 2022, 8:39 AM
przemek updated the summary of D5724: [web] Fixed visual bug with disappearing buttons.
Nov 25 2022, 8:39 AM
przemek updated the diff for D5724: [web] Fixed visual bug with disappearing buttons.

Fixed. Changes I've made in previous diff were.. far fetched to say the least. Minor css fix did the job!

Nov 25 2022, 8:35 AM
przemek updated the diff for D5722: [web] Creating typeahead overlay in ChatInputbar.

Realized too late that it also should be put inside useMemo.

Nov 25 2022, 8:17 AM
przemek added inline comments to D5722: [web] Creating typeahead overlay in ChatInputbar.
Nov 25 2022, 8:13 AM
przemek updated the diff for D5722: [web] Creating typeahead overlay in ChatInputbar.

Responded to inlines and fixed code.

Nov 25 2022, 8:12 AM
przemek updated the diff for D5720: [web] Calling utility functions in Overlay component..

Fixed props.

Nov 25 2022, 8:10 AM
przemek added inline comments to D5720: [web] Calling utility functions in Overlay component..
Nov 25 2022, 8:10 AM
przemek updated the diff for D5719: [web] Added more utility functions for typeahead..

Had some problems with our git workflow and left that as an artifact. Sorry for that, fixed now.

Nov 25 2022, 8:09 AM
przemek added inline comments to D5719: [web] Added more utility functions for typeahead..
Nov 25 2022, 8:04 AM
przemek updated the diff for D5719: [web] Added more utility functions for typeahead..

Responded to inlines and fixed code.

Nov 25 2022, 8:04 AM
przemek updated the diff for D5717: [web] Moved typeahead utils to `web/chat`.

Rebase

Nov 25 2022, 7:57 AM
przemek updated the diff for D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

Renaming function

Nov 25 2022, 7:54 AM
przemek added inline comments to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..
Nov 25 2022, 3:54 AM
przemek requested review of D5726: [web] Added on enter animation for typeahead overlay..
Nov 25 2022, 3:54 AM
przemek added a comment to D5595: [Web] Added current cursor position to StateInput.

Yes, ff we swap textarea to contentEditable and keep saving caret position in context we keep the feature of saving its position when changing threads. It would require some changes, but nothing to serious.

Nov 25 2022, 1:35 AM

Nov 24 2022

przemek added a comment to D5595: [Web] Added current cursor position to StateInput.

I think saving caret position is not strictly necessary now. I preferred to use it, as we treat textarea as controlled component, so we want to control it via state we can update use.
Without saving cursor position:

  1. We would need to rely on selection start and end from textarea element. With editable div, we would rely on global Selection object.
  2. We wouldn't get that nice-to-have saving cursor position when jumping between threads
Nov 24 2022, 9:42 AM
przemek requested review of D5724: [web] Fixed visual bug with disappearing buttons.
Nov 24 2022, 9:25 AM
przemek requested review of D5722: [web] Creating typeahead overlay in ChatInputbar.
Nov 24 2022, 8:34 AM
przemek added 1 blocking reviewer(s) for D5720: [web] Calling utility functions in Overlay component.: tomek.
Nov 24 2022, 7:42 AM
przemek requested review of D5720: [web] Calling utility functions in Overlay component..
Nov 24 2022, 7:40 AM
przemek requested review of D5719: [web] Added more utility functions for typeahead..
Nov 24 2022, 7:32 AM
przemek added 1 blocking reviewer(s) for D5717: [web] Moved typeahead utils to `web/chat`: tomek.
Nov 24 2022, 6:28 AM
przemek requested review of D5717: [web] Moved typeahead utils to `web/chat`.
Nov 24 2022, 6:25 AM
przemek added a comment to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

Hi @ashoat, I spent some time looking and tried my best to find some quality source , but couldn't find any. Most are old, low quality posts.
I think your's and Tomek's experience and opinions would be more valuable than those.
I see two possible solutions here:

  1. We go with current solution based on textarea.
  2. We spend some time refactoring ChatInputBar to use div with contentEditable enabled. That would require extra work as we would need to handle some more things manually.
Nov 24 2022, 6:02 AM
przemek closed D5673: [lib] Refactor getThreadOtherUsers and all its occurrences.
Nov 24 2022, 1:49 AM
przemek committed rCOMMb6fe5236c2d5: [lib] Refactor getThreadOtherUsers and all its occurrences (authored by przemek).
[lib] Refactor getThreadOtherUsers and all its occurrences
Nov 24 2022, 1:49 AM
przemek closed D5660: [web] Typeahead overlay visual.
Nov 24 2022, 1:45 AM
przemek committed rCOMM364c804b2d0f: [web] Typeahead overlay visual (authored by przemek).
[web] Typeahead overlay visual
Nov 24 2022, 1:45 AM
przemek closed D5595: [Web] Added current cursor position to StateInput.
Nov 24 2022, 1:44 AM
przemek committed rCOMM048a6dfce1df: [Web] Added current cursor position to StateInput (authored by przemek).
[Web] Added current cursor position to StateInput
Nov 24 2022, 1:44 AM

Nov 22 2022

przemek added a comment to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

No, unfortunately it does not, because of this:

Nov 22 2022, 9:01 AM
przemek added a comment to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

After some research I was not able to find any site explicitly telling that it can't be done in another way, but the only two feasible solutions I see is:

  1. Go with textarea and dummy div.
  2. Go with custom textarea(div) and use window.getSelection()
Nov 22 2022, 7:17 AM
przemek added a comment to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

After further reading on above solution I discovered one gimmick. We would either need to implement custom textarea i.e. we would need div(which we probably don't want) as window.getSelection() doesn't trigger correctly in textareas, because
they provide custom API (https://html.spec.whatwg.org/#textFieldSelection).

Nov 22 2022, 7:04 AM
przemek added a comment to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

Yeah, sorry for that. I thought I browsed through most of it and couldn't find anything interesting, that would differ significantly from what I've done.
This solution though seems good and much clearer than creating dummy div:
https://javascript.plainenglish.io/how-to-find-the-caret-inside-a-contenteditable-element-955a5ad9bf81
https://codesandbox.io/s/caret-coordinates-index-contenteditable-9tq3o?from-embed=&file=/src/index.js:577-591

Nov 22 2022, 6:13 AM
przemek added a comment to D5673: [lib] Refactor getThreadOtherUsers and all its occurrences.

Done. It would be nice to have unit tests covering utility functions like that. Probably will mention it during today's monthly planning.

Nov 22 2022, 4:00 AM
przemek updated the test plan for D5673: [lib] Refactor getThreadOtherUsers and all its occurrences.
Nov 22 2022, 3:59 AM
przemek added inline comments to D5660: [web] Typeahead overlay visual.
Nov 22 2022, 3:47 AM
przemek updated the diff for D5660: [web] Typeahead overlay visual.

Responded to inlines

Nov 22 2022, 3:47 AM
przemek added a comment to D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..

Initially I got idea from this site: https://jh3y.medium.com/how-to-where-s-the-caret-getting-the-xy-position-of-the-caret-a24ba372990a.
I browsed through available resources and what people suggested was either that, or even more hacky solution using canvas. Some of solutions only gave offset of caret in characters count, but that's insufficient for us, as we need x,y position of caret in textarea.
Later on I found npm package that does it in a similar way:
https://github.com/component/textarea-caret-position

Nov 22 2022, 3:28 AM

Nov 18 2022

przemek requested review of D5674: [lib] Added getTextsOffsets function. Refactored mention-utils.js..
Nov 18 2022, 7:57 AM
przemek requested review of D5673: [lib] Refactor getThreadOtherUsers and all its occurrences.
Nov 18 2022, 7:45 AM
przemek added inline comments to D5660: [web] Typeahead overlay visual.
Nov 18 2022, 7:44 AM
przemek updated the diff for D5660: [web] Typeahead overlay visual.

Fixed button import...
Fallen into a trap of VSCode automatically importing Button as button.

Nov 18 2022, 6:43 AM
przemek updated the diff for D5660: [web] Typeahead overlay visual.

Responded to inlines, fixed where neccessary.

Nov 18 2022, 6:32 AM
przemek added inline comments to D5660: [web] Typeahead overlay visual.
Nov 18 2022, 2:47 AM
przemek updated the diff for D5660: [web] Typeahead overlay visual.

Responded to inlines, fixed code and tested if it didn't break renders.

Nov 18 2022, 2:31 AM
przemek added a comment to D5595: [Web] Added current cursor position to StateInput.

(Did we take a look at any prior work for this? This seems like the sort of problem that others have probably run into before and there might be established or simpler solutions we could work off of?)

Nov 18 2022, 1:49 AM

Nov 17 2022

przemek updated the diff for D5660: [web] Typeahead overlay visual.

Added theme.css changes as well. Sorry for missing that.

Nov 17 2022, 2:52 AM
przemek requested review of D5660: [web] Typeahead overlay visual.
Nov 17 2022, 2:49 AM