You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/25 21:09:43 UTC

[GitHub] [superset] riahk opened a new pull request, #20857: feat(welcome): updates to extension registry for workspace home sidescroll/table UI

riahk opened a new pull request, #20857:
URL: https://github.com/apache/superset/pull/20857

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   - [x] Adds extension names for `WelcomeData` and `WelcomeTable` extensions
   - [x] Insert extensions in `Welcome` component
   - [x] Update custom antd `Radio` component  to allow use of `Radio.Button`
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] samtfm commented on a diff in pull request #20857: feat(welcome): updates to extension registry for workspace home sidescroll/table UI

Posted by GitBox <gi...@apache.org>.
samtfm commented on code in PR #20857:
URL: https://github.com/apache/superset/pull/20857#discussion_r937223411


##########
superset-frontend/src/views/CRUD/welcome/Welcome.tsx:
##########
@@ -180,6 +180,8 @@ function Welcome({ user, addDangerToast }: WelcomeProps) {
   };
 
   const WelcomeTopExtension = extensionsRegistry.get('welcome.banner');
+  const WelcomeDataExtension = uiOverrideRegistry.get('welcome.data');
+  const WelcomeTableExtension = uiOverrideRegistry.get('welcome.table');

Review Comment:
   Is it necessary to have two extension points here? From the Superset perspective, this extension is a general purpose "replace the homepage with anything" component, that Preset happens to be using for some data and a table.



##########
superset-frontend/src/views/CRUD/welcome/Welcome.tsx:
##########
@@ -283,70 +285,80 @@ function Welcome({ user, addDangerToast }: WelcomeProps) {
   return (
     <WelcomeContainer>
       {WelcomeTopExtension && <WelcomeTopExtension />}
-      <WelcomeNav>
-        <h1 className="welcome-header">Home</h1>
-        {isFeatureEnabled(FeatureFlag.THUMBNAILS) ? (
-          <div className="switch">
-            <AntdSwitch checked={checked} onChange={handleToggle} />
-            <span>Thumbnails</span>
-          </div>
-        ) : null}
-      </WelcomeNav>
-      <Collapse activeKey={activeState} onChange={handleCollapse} ghost bigger>
-        <Collapse.Panel header={t('Recents')} key="1">
-          {activityData &&
-          (activityData.Viewed ||
-            activityData.Examples ||
-            activityData.Created) &&
-          activeChild !== 'Loading' ? (
-            <ActivityTable
-              user={{ userId: user.userId! }} // user is definitely not a guest user on this page
-              activeChild={activeChild}
-              setActiveChild={setActiveChild}
-              activityData={activityData}
-              loadedCount={loadedCount}
-            />
-          ) : (
-            <LoadingCards />
-          )}
-        </Collapse.Panel>
-        <Collapse.Panel header={t('Dashboards')} key="2">
-          {!dashboardData || isRecentActivityLoading ? (
-            <LoadingCards cover={checked} />
-          ) : (
-            <DashboardTable
-              user={user}
-              mine={dashboardData}
-              showThumbnails={checked}
-              examples={activityData?.Examples}
-            />
-          )}
-        </Collapse.Panel>
-        <Collapse.Panel header={t('Charts')} key="3">
-          {!chartData || isRecentActivityLoading ? (
-            <LoadingCards cover={checked} />
-          ) : (
-            <ChartTable
-              showThumbnails={checked}
-              user={user}
-              mine={chartData}
-              examples={activityData?.Examples}
-            />
-          )}
-        </Collapse.Panel>
-        <Collapse.Panel header={t('Saved queries')} key="4">
-          {!queryData ? (
-            <LoadingCards cover={checked} />
-          ) : (
-            <SavedQueries
-              showThumbnails={checked}
-              user={user}
-              mine={queryData}
-              featureFlag={isFeatureEnabled(FeatureFlag.THUMBNAILS)}
-            />
-          )}
-        </Collapse.Panel>
-      </Collapse>
+      {WelcomeDataExtension && <WelcomeDataExtension user={user} />}
+      {WelcomeTableExtension && (
+        <WelcomeTableExtension examples={activityData?.Examples} user={user} />
+      )}

Review Comment:
   Oh, I see these are passed different data. If it's possible to combine these and fetch data without the use of parameters, I think that would be preferable. (in line with keeping extensions general purpose, not just tailored to what Preset is using them for).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(welcome): updates to extension registry for workspace home sidescroll/table UI [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #20857:
URL: https://github.com/apache/superset/pull/20857#issuecomment-1924303226

   Closing this, but we can re-open at any time if needed (CC @eschutho)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(welcome): updates to extension registry for workspace home sidescroll/table UI [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #20857: feat(welcome): updates to extension registry for workspace home sidescroll/table UI
URL: https://github.com/apache/superset/pull/20857


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org