Rebase
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Aug 30 2023
Modify regex
Rebase after D8833 changes
Rebase after D8833 changes
Make structure lighter
Rebase
Rebase
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.
In D8909#265267, @inka wrote:otherwise default_text is rendered.
Can you explain what this means, and point me to where it is done?
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.
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.
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 29 2023
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 25 2023
Aug 24 2023
Rebase and match refactored component style
Rebase and match new refactored component style
Rebase
Rebase
Rebase
Rebase
Rebase
Rebase
Refactor 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 23 2023
Aug 22 2023
item: | { type: 'user', user: RelativeMemberInfo } | { type: 'chat', chat: ResolvedThreadInfo },
Will introduce new type, which will be reused in getMentionTypeahead(User/Chat)Suggestions.
const suggestions = [ ...suggestedUsers.map(user => ({ type: 'user', user })), ...suggestedChats.map(chat => ({ type: 'chat', chat })), ];
Destructure chatContext
Remove optional chaining
Use isRevealed in onLongPress
Extract shouldBePressable condition from useMarkdownOnPressUtils
Extract shouldBePressable condition from useMarkdownOnPressUtils
Rename shouldBePressable to isRevealed
Remove blockOnPress variable from useMarkdownOnPressUtils
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)?
Change mixed to void
Change id detection regex
Use SimpleMarkdown.inlineRegex
Use SimpleMarkdown.inlineRegex
Remove matchChatMentions
Fix nit
Handle style condition in rules.react.js
Use useNavigateToThreadWithFadeAnimation hook directly in component
Remove style prop
Probably it failed because of D8873 previous diff -> I forgot to add messageKey argument.
Aug 21 2023
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.
Move regex and decode function to mention-utils.js
Aug 20 2023
Aug 4 2023
I'm planning to move HTTP Range test to a separate test.
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.
Tested this on Safari and Chrome and it's working! Weird that on Firefox everything works well with overflow: auto.