-
Notifications
You must be signed in to change notification settings - Fork 15.5k
feat(UserInfo): Migrate User Info FAB to React #33620
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
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've completed my review and didn't find any issues.
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/components/Descriptions/index.tsx | ✅ |
superset/views/user_info.py | ✅ |
superset/views/users/schemas.py | ✅ |
superset-frontend/src/components/Modal/FormModal.tsx | ✅ |
superset-frontend/src/types/bootstrapTypes.ts | ✅ |
superset-frontend/src/components/Icons/AntdEnhanced.tsx | ✅ |
superset-frontend/src/views/routes.tsx | ✅ |
superset-frontend/src/features/userInfo/UserInfoModal.tsx | ✅ |
superset/views/users/api.py | ✅ |
superset-frontend/src/pages/UserInfo/index.tsx | ✅ |
superset/views/base.py | ✅ |
superset/views/utils.py | ✅ |
superset/initialization/init.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
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.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
Category | Issue | Status |
---|---|---|
Non-Descriptive Method Name ▹ view | 🧠 Incorrect | |
Missing Translation Wrapper ▹ view | 🧠 Not in scope | |
Redundant field descriptions ▹ view | 🧠 Incorrect | |
Missing Permission Check for User Info Route ▹ view | 🧠 Incorrect | |
Inconsistent Component Type Annotations ▹ view | 🧠 Incorrect | |
Unverified secure transport for password transmission ▹ view | 🧠 Not in standard | |
Missing autocomplete prevention on password field ▹ view | 🧠 Not in standard | |
Memoize Password Validator Function ▹ view | 🧠 Not in scope | |
Incorrect API endpoint for user updates ▹ view | 🧠 Incorrect | |
Inconsistent Marshmallow Field Imports ▹ view | 🧠 Not in standard |
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/src/components/Descriptions/index.tsx | ✅ |
superset/views/user_info.py | ✅ |
superset/views/users/schemas.py | ✅ |
superset-frontend/src/components/Modal/FormModal.tsx | ✅ |
superset-frontend/src/types/bootstrapTypes.ts | ✅ |
superset-frontend/src/components/Icons/AntdEnhanced.tsx | ✅ |
superset/commands/database/validate.py | ✅ |
superset-frontend/src/features/allEntities/AllEntitiesTable.tsx | ✅ |
superset-frontend/src/features/tags/tags.ts | ✅ |
superset-frontend/src/views/routes.tsx | ✅ |
superset-frontend/src/features/userInfo/UserInfoModal.tsx | ✅ |
superset/views/users/api.py | ✅ |
superset-frontend/src/pages/UserInfo/index.tsx | ✅ |
superset/views/base.py | ✅ |
superset/views/utils.py | ✅ |
superset/daos/tag.py | ✅ |
superset/tags/api.py | ✅ |
superset/initialization/init.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
from marshmallow import fields, Schema | ||
from marshmallow.fields import Boolean, Integer, String |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
first_name_description = "The current user's first name" | ||
last_name_description = "The current user's last name" | ||
password_description = "The current user's password for authentication" # noqa: S105 |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
def list(self) -> FlaskResponse: | ||
return super().render_app_template() |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -243,6 +247,7 @@ export const routes: Routes = [ | |||
path: '/sqllab/', | |||
Component: SqlLab, | |||
}, | |||
{ path: '/user_info/', Component: UserInfo }, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
const UsersList: LazyExoticComponent<any> = lazy( | ||
() => import(/* webpackChunkName: "UsersList" */ 'src/pages/UsersList'), | ||
); | ||
|
||
const UserInfo = lazy( | ||
() => import(/* webpackChunkName: "UserInfo" */ 'src/pages/UserInfo'), | ||
); | ||
const ActionLogList: LazyExoticComponent<any> = lazy( | ||
() => import(/* webpackChunkName: "ActionLogList" */ 'src/pages/ActionLog'), | ||
); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
await SupersetClient.put({ | ||
endpoint: `/api/v1/me/`, | ||
jsonPayload: { ...payload }, | ||
}); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
<Input.Password | ||
name="password" | ||
placeholder="Enter the user's password" | ||
/> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
> | ||
<Input.Password | ||
name="password" | ||
placeholder="Enter the user's password" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
const ResetPasswordFields = () => ( | ||
<> | ||
<FormItem | ||
name="password" | ||
label={t('Password')} | ||
rules={[{ required: true, message: t('Password is required') }]} | ||
> | ||
<Input.Password | ||
name="password" | ||
placeholder="Enter the user's password" | ||
/> | ||
</FormItem> | ||
<FormItem | ||
name="confirm_password" | ||
label={t('Confirm Password')} | ||
dependencies={['password']} | ||
rules={[ | ||
{ | ||
required: true, | ||
message: t('Please confirm your password'), | ||
}, | ||
({ getFieldValue }) => ({ | ||
validator(_, value) { | ||
if (!value || getFieldValue('password') === value) { | ||
return Promise.resolve(); | ||
} | ||
return Promise.reject(new Error(t('Passwords do not match!'))); | ||
}, | ||
}), | ||
]} | ||
> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
try { | ||
const { confirm_password, ...payload } = values; | ||
await SupersetClient.put({ | ||
endpoint: `/api/v1/me/`, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@EnxDev Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@EnxDev Ephemeral environment spinning up at http://54.203.88.194:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
f39d4fa
to
bc51f93
Compare
@EnxDev Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@EnxDev Ephemeral environment spinning up at http://44.245.179.174:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
@EnxDev Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments |
@EnxDev Ephemeral environment spinning up at http://35.167.60.95:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
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.
LGTM!
SUMMARY 🚀
This PR migrates the UserInfo view from server-side rendering (SSR) to a fully client-side React implementation ⚛️
While the UI remains largely unchanged, the data fetching logic is now handled entirely on the client side for better maintainability and consistency.
Changes Included 🔧
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before

After

After

Before

After

Before

TESTING INSTRUCTIONS
superset init
ADDITIONAL INFORMATION