Page MenuHomePhabricator
Feed Advanced Search

Aug 30 2023

patryk updated the diff for D9005: [lib] Introduce chat mention utilities for plain text.

Rebase

Aug 30 2023, 6:45 AM
patryk updated the diff for D8834: [lib] Introduce chat mention match and parse utilities.

Modify regex

Aug 30 2023, 6:43 AM
patryk updated the diff for D8910: [native] Show chats in mention typeahead tooltip.

Rebase after D8833 changes

Aug 30 2023, 6:36 AM
patryk updated the diff for D8900: [lib] Add chat mention SearchIndex selector.

Rebase after D8833 changes

Aug 30 2023, 6:36 AM
patryk updated the diff for D8833: [lib] Introduce chat mention candidates getters.

Make structure lighter

Aug 30 2023, 6:34 AM
patryk updated the diff for D8910: [native] Show chats in mention typeahead tooltip.

Rebase

Aug 30 2023, 5:02 AM
patryk updated the diff for D8847: [native] Change ChatContextProvider position.

Rebase

Aug 30 2023, 5:02 AM
patryk added inline comments to D8833: [lib] Introduce chat mention candidates getters.
Aug 30 2023, 1:53 AM
patryk updated the summary of D9005: [lib] Introduce chat mention utilities for plain text.
Aug 30 2023, 1:40 AM
patryk updated the summary of D9005: [lib] Introduce chat mention utilities for plain text.
Aug 30 2023, 1:40 AM
patryk added a comment to D9006: [keyserver] Introduce function which checks if thread is mentionable.

maybe it'd be good to have a blocking reviewer who is more familiar [with recursive SQL queries]

This query was taken from here (just changed containing_thread_id to parent_thread_id). It was actually written by me (with Ashoats help) so logically I should be a blocking reviewer since this code is the only recursive query in the keyserver :D. But I will find someone who knows more about recursive queries and add them as a blocking reviewer.

Aug 30 2023, 12:35 AM
patryk added inline comments to D8945: [web] Show chats in mention typeahead tooltip.
Aug 30 2023, 12:31 AM
patryk added inline comments to D8943: [web] Refactor TypeaheadTooltip component.
Aug 30 2023, 12:25 AM
patryk added a comment to D8909: [native] Replace chat name with raw chat mention.
In D8909#265267, @inka wrote:

otherwise default_text is rendered.

Can you explain what this means, and point me to where it is done?

Aug 30 2023, 12:18 AM
patryk added a comment to D8901: [lib] Add userStoreMentionSearchIndex selector.

Wouldn't it close when there are no more matches?

It would. But as said in a summary:
because SearchIndex catches keywords rather than whole text prefix, when user would type whole username and then input a space, the tooltip would never close. I wrote an example below.

Aug 30 2023, 12:14 AM
patryk added a comment to D8900: [lib] Add chat mention SearchIndex selector.

Discussed this offline:

But I don't understand why we needed to exclude the thread itself from its chatMentionCandidates, but we don't need to exclude it from this structure? Can you explain please?

Excluding the thread in which we mention was being handled by getMentionTypeaheadChatSuggestions introduced in D8910 (see for (const threadID in chatMentionCandidates) loop). But this is going to be modified: to avoid unnecessary for loop we can either extract thread itself from useThreadChatMentionSearchIndex or just to add if condition in getMentionTypeaheadChatSuggestions which filters out current thread id.

Aug 30 2023, 12:07 AM
patryk added a comment to D8897: [native] Refactor TypeaheadTooltip component.

I'm confused about your usage of parameters everywhere (<SuggestionItemType>). Is the tooltip ever rendering only one of TypeaheadUserSuggestionItem or TypeaheadChatSuggestionItem (as I'm guessing it will be called)? Why don't you just use TypeaheadSuggestionItem (that I'm guessing will be TypeaheadUserSuggestionItem | TypeaheadChatSuggestionItem)

TypeaheadSuggestionItem will be equal to (as you correctly guessed) TypeaheadUserSuggestionItem | TypeaheadChatSuggestionItem in the next diff: renderer function needs to decide what avatar to render since we use separate components to render user and thread avatars.

Could you also explain what the execute in TypeaheadTooltipActionItem is?

See this. execute is a onPress handler. TypeaheadTooltipActionItem is a copy of this type, which is moved to lib.

Aug 30 2023, 12:05 AM

Aug 29 2023

patryk added inline comments to D8852: [web] Introduce markdown component for chat mentions.
Aug 29 2023, 11:46 PM
patryk added a comment to D8847: [native] Change ChatContextProvider position.

Can you explain why we need to wrap the Provider in React.memo all of the sudden?

It was discussed during my 1:1 with Ashoat: he suggested that since I want to move this provider, it would also be good to wrap this in React.memo.

You have some CI errors, please address them.

Probably connected with previous diffs where I forgot to add one argument: will run them again when I update test plan.

Can you also add to the test plan checking if methods from ChatContextProvider are not being used in the components that are now not under it? like SQLiteDataHandler, ConnectedStatusBar, whatever is in gated (line 284) etc. Changing the structure like this seems very dangerous, so I'd rather you test it thoroughly.

During my 1:1 with Ashoat, we also discussed potential issues that might arise. While we didn't identify any problems, it's still a good idea to add more information to the test plan.

Aug 29 2023, 11:44 PM
patryk added inline comments to D8845: [native] Introduce markdown component for chat mentions.
Aug 29 2023, 11:39 PM
patryk published D9007: [keyserver] Render chat mention in notification text for review.
Aug 29 2023, 7:31 AM
patryk published D9006: [keyserver] Introduce function which checks if thread is mentionable for review.
Aug 29 2023, 7:31 AM
patryk published D9005: [lib] Introduce chat mention utilities for plain text for review.
Aug 29 2023, 7:31 AM

Aug 25 2023

patryk updated the summary of D8945: [web] Show chats in mention typeahead tooltip.
Aug 25 2023, 4:05 AM
patryk published D8945: [web] Show chats in mention typeahead tooltip for review.
Aug 25 2023, 4:02 AM
patryk published D8944: [web] Modify mention typeahead regex for review.
Aug 25 2023, 4:01 AM
patryk published D8943: [web] Refactor TypeaheadTooltip component for review.
Aug 25 2023, 4:01 AM

Aug 24 2023

patryk updated the diff for D8910: [native] Show chats in mention typeahead tooltip.

Rebase and match refactored component style

Aug 24 2023, 1:45 PM
patryk updated the diff for D8909: [native] Replace chat name with raw chat mention.

Rebase and match new refactored component style

Aug 24 2023, 1:45 PM
patryk updated the diff for D8908: [lib] Encode chat name in raw chat mention.

Rebase

Aug 24 2023, 1:44 PM
patryk updated the diff for D8902: [web][native] Use userStoreMentionSearchIndex.

Rebase

Aug 24 2023, 1:44 PM
patryk updated the diff for D8901: [lib] Add userStoreMentionSearchIndex selector.

Rebase

Aug 24 2023, 1:43 PM
patryk updated the diff for D8900: [lib] Add chat mention SearchIndex selector.

Rebase

Aug 24 2023, 1:42 PM
patryk updated the diff for D8899: [lib] Introduce SentencePrefixSearchIndex.

Rebase

Aug 24 2023, 1:42 PM
patryk updated the diff for D8898: [web][native] Modify typeahead function and variable names to distinguish chat mention utilities.

Rebase

Aug 24 2023, 1:42 PM
patryk updated the diff for D8897: [native] Refactor TypeaheadTooltip component.

Refactor component

Aug 24 2023, 1:41 PM
patryk planned changes to D8897: [native] Refactor TypeaheadTooltip component.

We use getTypeaheadTooltipActions to extract user info and getTypeaheadTooltipButtons as typeahead button renderer on web, so extracting typeaheadTooltipButton and typeaheadTooltipSuggestionTextExtractor to typeahead utils seems like a better idea.

Aug 24 2023, 1:50 AM

Aug 23 2023

patryk closed D8923: [native] Refactor infinite image loader fix.
Aug 23 2023, 4:31 AM
patryk committed rCOMM3e3f8b28d6fc: [native] Refactor infinite image loader fix (authored by patryk).
[native] Refactor infinite image loader fix
Aug 23 2023, 4:31 AM
patryk updated the summary of D8923: [native] Refactor infinite image loader fix.
Aug 23 2023, 4:13 AM
patryk published D8923: [native] Refactor infinite image loader fix for review.
Aug 23 2023, 4:12 AM

Aug 22 2023

patryk planned changes to D8909: [native] Replace chat name with raw chat mention.
item:
  | { type: 'user', user: RelativeMemberInfo }
  | { type: 'chat', chat: ResolvedThreadInfo },

Will introduce new type, which will be reused in getMentionTypeahead(User/Chat)Suggestions.

Aug 22 2023, 9:35 AM
patryk planned changes to D8910: [native] Show chats in mention typeahead tooltip.
const suggestions = [
  ...suggestedUsers.map(user => ({ type: 'user', user })),
  ...suggestedChats.map(chat => ({ type: 'chat', chat })),
];
Aug 22 2023, 9:33 AM
patryk published D8910: [native] Show chats in mention typeahead tooltip for review.
Aug 22 2023, 8:39 AM
patryk published D8909: [native] Replace chat name with raw chat mention for review.
Aug 22 2023, 8:38 AM
patryk published D8908: [lib] Encode chat name in raw chat mention for review.
Aug 22 2023, 8:38 AM
patryk published D8902: [web][native] Use userStoreMentionSearchIndex for review.
Aug 22 2023, 8:38 AM
patryk published D8901: [lib] Add userStoreMentionSearchIndex selector for review.
Aug 22 2023, 8:38 AM
patryk published D8900: [lib] Add chat mention SearchIndex selector for review.
Aug 22 2023, 8:38 AM
patryk published D8899: [lib] Introduce SentencePrefixSearchIndex for review.
Aug 22 2023, 8:37 AM
patryk published D8898: [web][native] Modify typeahead function and variable names to distinguish chat mention utilities for review.
Aug 22 2023, 8:37 AM
patryk published D8897: [native] Refactor TypeaheadTooltip component for review.
Aug 22 2023, 8:37 AM
patryk published D8896: [web][native] Rename usernamePrefix to textPrefix in TypeaheadMatchedStrings type for review.
Aug 22 2023, 8:37 AM
patryk updated the diff for D8873: [native] Make chat mentions clickable.

Destructure chatContext

Aug 22 2023, 8:17 AM
patryk updated the diff for D8873: [native] Make chat mentions clickable.

Remove optional chaining

Aug 22 2023, 8:04 AM
patryk updated the diff for D8873: [native] Make chat mentions clickable.

Use isRevealed in onLongPress

Aug 22 2023, 7:58 AM
patryk updated the diff for D8845: [native] Introduce markdown component for chat mentions.

Extract shouldBePressable condition from useMarkdownOnPressUtils

Aug 22 2023, 7:50 AM
patryk updated the diff for D8873: [native] Make chat mentions clickable.

Extract shouldBePressable condition from useMarkdownOnPressUtils

Aug 22 2023, 7:42 AM
patryk updated the diff for D8844: [native] Refactor markdown-link component.

Rename shouldBePressable to isRevealed

Aug 22 2023, 7:40 AM
patryk updated the diff for D8844: [native] Refactor markdown-link component.

Remove blockOnPress variable from useMarkdownOnPressUtils

Aug 22 2023, 7:35 AM
patryk added a comment to D8849: [native] Add chat mention rule to text message rules.

I think I misunderstood your feedback @rohan, did you mean that it's better to use styles inside a MarkdownChatMention component (use const styles = getMarkdownStyles(useDarkStyle ? 'dark' : 'light') inside the component and not passing styles as a prop)?

Aug 22 2023, 7:30 AM
patryk updated the diff for D8844: [native] Refactor markdown-link component.

Change mixed to void

Aug 22 2023, 7:09 AM
patryk updated the diff for D8834: [lib] Introduce chat mention match and parse utilities.

Change id detection regex

Aug 22 2023, 6:55 AM
patryk updated the summary of D8875: [web] Make chat mentions clickable.
Aug 22 2023, 1:37 AM
patryk updated the diff for D8853: [web] Add chat mention rule to text message rules.

Use SimpleMarkdown.inlineRegex

Aug 22 2023, 1:22 AM
patryk updated the diff for D8849: [native] Add chat mention rule to text message rules.

Use SimpleMarkdown.inlineRegex

Aug 22 2023, 1:21 AM
patryk updated the diff for D8834: [lib] Introduce chat mention match and parse utilities.

Remove matchChatMentions

Aug 22 2023, 1:19 AM
patryk updated the diff for D8849: [native] Add chat mention rule to text message rules.

Fix nit

Aug 22 2023, 12:57 AM
patryk updated the diff for D8849: [native] Add chat mention rule to text message rules.

Handle style condition in rules.react.js

Aug 22 2023, 12:56 AM
patryk updated the diff for D8873: [native] Make chat mentions clickable.

Use useNavigateToThreadWithFadeAnimation hook directly in component

Aug 22 2023, 12:54 AM
patryk updated the diff for D8845: [native] Introduce markdown component for chat mentions.

Remove style prop

Aug 22 2023, 12:48 AM
patryk added a comment to D8849: [native] Add chat mention rule to text message rules.

Probably it failed because of D8873 previous diff -> I forgot to add messageKey argument.

Aug 22 2023, 12:36 AM

Aug 21 2023

patryk added a comment to D8871: [web][native] Refactor getDefaultTextMessageRules.

My primary motivation for this diff was to align with the rules.react.js style. We use _memoize for almost all variables/functions defined in this file. I felt that storing getDefaultTextMessageRules in a variable, instead of following this file convention, was making this piece of code somewhat outdated. While using _memoize might not lead to significant improvements, it does, in my opinion, present a better aesthetic. However, I'm open to other reviewers' perspectives and suggestions.

Aug 21 2023, 1:59 PM
patryk added inline comments to D8873: [native] Make chat mentions clickable.
Aug 21 2023, 1:48 PM
patryk updated the diff for D8834: [lib] Introduce chat mention match and parse utilities.

Move regex and decode function to mention-utils.js

Aug 21 2023, 4:46 AM

Aug 20 2023

patryk updated the summary of D8877: [web] Fix spoiler animation for links.
Aug 20 2023, 11:33 PM
patryk updated the summary of D8876: [web] Inherit colors on spoiler reveal animation.
Aug 20 2023, 11:25 PM
patryk published D8853: [web] Add chat mention rule to text message rules for review.
Aug 20 2023, 11:15 PM
patryk published D8876: [web] Inherit colors on spoiler reveal animation for review.
Aug 20 2023, 11:15 PM
patryk published D8877: [web] Fix spoiler animation for links for review.
Aug 20 2023, 11:14 PM
patryk published D8875: [web] Make chat mentions clickable for review.
Aug 20 2023, 11:14 PM
patryk published D8852: [web] Introduce markdown component for chat mentions for review.
Aug 20 2023, 11:14 PM
patryk published D8851: [web] Use chat mention candidates in markdown rules for review.
Aug 20 2023, 11:13 PM
patryk published D8849: [native] Add chat mention rule to text message rules for review.
Aug 20 2023, 11:13 PM
patryk published D8874: [native] Memorize ChatContextProvider for review.
Aug 20 2023, 11:13 PM
patryk published D8847: [native] Change ChatContextProvider position for review.
Aug 20 2023, 11:13 PM
patryk published D8846: [native] Use chat mention candidates in markdown rules for review.
Aug 20 2023, 11:13 PM
patryk published D8871: [web][native] Refactor getDefaultTextMessageRules for review.
Aug 20 2023, 11:12 PM
patryk published D8873: [native] Make chat mentions clickable for review.
Aug 20 2023, 11:12 PM
patryk published D8845: [native] Introduce markdown component for chat mentions for review.
Aug 20 2023, 11:12 PM
patryk published D8844: [native] Refactor markdown-link component for review.
Aug 20 2023, 11:11 PM
patryk published D8834: [lib] Introduce chat mention match and parse utilities for review.
Aug 20 2023, 11:11 PM
patryk published D8833: [lib] Introduce chat mention candidates getters for review.
Aug 20 2023, 11:11 PM

Aug 4 2023

patryk planned changes to D8647: [blob-service] Test HTTP Ranges.

I'm planning to move HTTP Range test to a separate test.

Aug 4 2023, 3:20 AM
patryk planned changes to D8643: [blob-service] Clean up uploaded blob data if any test fails.

I'm planning to refactor this code. I would like to use the Drop trait to handle removing BlobData, but I need to conduct some research to determine if this solution would be thread-safe.

Aug 4 2023, 3:19 AM
patryk accepted D8727: [web] Fix small thread list scrolling issue.

Tested this on Safari and Chrome and it's working! Weird that on Firefox everything works well with overflow: auto.

Aug 4 2023, 2:58 AM
patryk closed D8648: [native] Use new Alert wrapper.
Aug 4 2023, 12:46 AM
patryk committed rCOMM0023c11bb001: [native] Use new Alert wrapper (authored by patryk).
[native] Use new Alert wrapper
Aug 4 2023, 12:46 AM

Aug 3 2023

patryk updated the diff for D8648: [native] Use new Alert wrapper.

Remove file

Aug 3 2023, 1:03 PM
patryk updated the test plan for D8648: [native] Use new Alert wrapper.
Aug 3 2023, 12:57 PM