-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Regression: Data in the "New Users" section is delayed in 1 day #22751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| import GenericTable from './GenericTable'; | ||
| import HeaderCell from './HeaderCell'; | ||
|
|
||
| export default Object.assign(GenericTable, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious as to why you used Object.assign here 🤓 Is it just a shortcut to writing GenericTable.HeaderCell = HeaderCell; in the line above? Or is there another reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh boy, you are the right guy to ask me this one. GenericTable has a function type (kind of (props: any) => ReactElement) defined at './GenericTable'. It doesn't provide any mechanism to extend it while changing the concrete value: GenericTable.HeaderCell = HeaderCell ; would trigger an error for me because GenericTable's type is not an extension of { HeaderCell: (props: any) => ReactElement; }. I've noticed that Object.assign() intersects the types of its arguments, so we get { (props: any): ReactElement; HeaderCell: (props: any) => ReactElement; } at the return type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it!
Does this generate a side-effect? I mean, if someone imported from the ./GenericTable file directly, the GenericTable exported there would also have the HeaderCell object due to Object.assign?
Of course, that wouldn't be a problem; TS wouldn't consider the original object to contain HeaderCell and I guess even the usual console.log would not print it there, it could only be confusing if you tried to see GenericTable's keys with Object.keys or other similar functions. Just asking, again, out of curiosity 😛
…ile_upload * 'develop' of github.com:RocketChat/Rocket.Chat: Regression: Data in the "New Users" section is delayed in 1 day (#22751) [FIX] Support ID param on createVisitor method (#22772) Regression: fix non ee tag field on canned responses (#22775) [FIX] Blank screen in message auditing DM tab (#22763) Show translated scope on cr dashboard (#22773) Regression: Fix empty tag field (#22767) Regression: Federation warnings on ci (#22765) Regression: fix outdated data on canned filters (#22766) [IMPROVE] Return open room if available for visitors (#22742) Regression: Fix empty canned responses table when searching (#22743) Regression: Filter of canned responses in contextual-bar (#22762) Regression: Fix users not being able to see the scope of the canned message (#22760) Regression: Fixes empty department field on edit canned responses (#22741) Regression: Allow users to update canned responses scope (#22738) allow users to search canned responses based on shortcut or content (#22735) Regression: Check for text before parse preview in create canned response form (#22754)
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Access Administration > Engagement Dashboard.

Expected behavior:
Further comments