-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ui: use StatementsPage from admin-ui-components #51910
Conversation
Hey there, Walid from Dpulls here! |
|
|
274d61e
to
b981762
Compare
|
|
b981762
to
aa0d5fe
Compare
|
|
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.
@koorosh the Statements Page storybook entry is currently broken. Can you take a look?
}; | ||
} | ||
|
||
export function trackStatementsPaginationAction(pageNum: number): PayloadAction<number> { |
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.
I thought we also had tracking on column sort events, did I make that up?
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.
Thanks, David! indeed it has to be restored!
@dhartunian the entire StatementsPage storybook is moved to |
|
|
Yes we can remove. Sounds good 👍 |
Previously, analytics functions (which track user interaction) were called directly from React components that made these functionality tightly coupled. Now, sagas used to watch actions related to user interaction and then call async logic in sagas. - components expose only callback functions which is related to the logic component is responsible; - connected component is responsible to dispatch actions with proper payload to be properly then handled by sagas. Release note: none
- Replace statementsPage component with extracted version from `admin-ui-component` package. - Provide correct props bindings to connected components, because changed logic of calling analytics tracking functionality. Release note: none
Initially, trackTableSort service was called directly from React components and had an issue with correct tracking of column names because `title` field has ReactNode type and cannot be casted to String type for analytics payload. With current change: - trackTableSort service doesn't depend on interfaces defined on representation level (decouples usage of service) - trackTableSort service is called via sagas by watching appropriate actions (again decouples service and representation layer) Release note: None
332565a
to
b816b22
Compare
|
|
|
|
1 similar comment
|
bors r+ |
Build succeeded: |
Depends on cockroachdb/admin-ui-components#9
Depends on cockroachdb/yarn-vendored#27
Depends on cockroachdb/yarn-vendored#28
StatementsPage
component is replaced with previously extracted version of StatementsPage inadmin-ui-components
.The new version (extracted) of
StatementsPage
has several changes that required to make the following adjustments:ActivateStatementDiagnostics
modal isn't connected components anymore so dispatching actions are pulled up to connected StatementsPage wrapper.called directly from React components that made this functionality tightly coupled.
Now, sagas used to watch actions related to user interaction and then call async logic in sagas.
-- components expose only callback functions which are related to the
the logic component is responsible;
-- connected component is responsible to dispatch actions with proper
payload to be properly then handled by sagas.