-
Notifications
You must be signed in to change notification settings - Fork 3
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
SHS-5913 Dashboard initiative #1689
base: 11.8.1-release
Are you sure you want to change the base?
Conversation
@ahughes3 |
I agree with that, thank you! |
…-5913_Dashboard-initiative
* feat(shs-5972): use default drupal layouts in dashboard * feat(shs-5972): use DashboardSectionStorage instead * feat(shs-5972): use DashboardSectionStorage instead * fix(shs-5972): small fixes in code * fix(shs-5972): small fixes in code * Update docroot/modules/humsci/hs_layouts/hs_layouts.info.yml Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com> --------- Co-authored-by: Mari Nez <mariannuar@gmail.com> Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
…-5913_Dashboard-initiative
* feat(SHS-5979 and SHS-5982): Add dashboard views and custom view code * chore(SHS-5979 and SHS-5982): Temp add chemistry as a Tugboat site * chore(SHS-5979 and SHS-5982): Temp add chemistry CI settings * feat(SHS-5979): Add pager for duplicate people - possible fix for timeout on Tugboat * feat(SHS-5979 and SHS-5982): Change no results text * chore(shs-5979): add latest edits and duplicate people blocks to test dashboard --------- Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
) * feat(shs-6004): update pages with the most issues block from editoria11y * chore(shs-6004): add editoria11y block to dashboard * fix(shs-6004): remove duplicated requirement in exported dashboard config --------- Co-authored-by: Mari Nez <mariannuar@gmail.com> Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
@joegl We created this branch to add all the dashboard related work. That includes general dashboard configuration and some blocks we want to include in it. We still need to add more blocks and probably some UI/UX improvements and fixes, but I wanted to ask you to take a quick look in case there's any issue that we can start working on before doing the final review. Thanks! |
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.
We should remember to upgrade to a real release.
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.
Now that Dashboard has a real release, we should switch to a stable version.
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.
That's exciting to finally get a stable release. Security Coverage too 😃
* feat(SHS-6055): Add importers block with people importer info table * fix(SHS-6055): Fix typo in dependency * fix(SHS-6055): Change to snake case, fix empty orphan action setting * feat(SHS-6055): Add no results message when no people importers are found * refactor(SHS-6055): Change name of some variables * chore(shs-6055): add importers block to test dashboard * feat(SHS-6055): Add changes from Albert review --------- Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
…-5913_Dashboard-initiative
…-5913_Dashboard-initiative
* feat(SHS-5979 and SHS-5982): Add dashboard views and custom view code * chore(SHS-5979 and SHS-5982): Temp add chemistry as a Tugboat site * chore(SHS-5979 and SHS-5982): Temp add chemistry CI settings * feat(SHS-5979): Add pager for duplicate people - possible fix for timeout on Tugboat * feat(SHS-5979 and SHS-5982): Change no results text * chore(shs-5979): add latest edits and duplicate people blocks to test dashboard * feat(SHS-5980): Add announcements block * fix(SHS-5980): Fix linting error * fix(shs-5980): remove tugboat chemistry config * fix(SHS-5980): Fix caching and empty CSV rows * fix(SHS-5980): Minor fixes from code review * feat(SHS-5980): Remove title column --------- Co-authored-by: Andrés Díaz Soto <andres.diaz.soto@gmail.com>
Tugboat has finished building the preview for this pull request! Links:
Dashboard: Visual Diffs: |
@@ -79,6 +79,7 @@ | |||
"drupal/core-composer-scaffold": "~10.3.0", | |||
"drupal/core-recommended": "~10.3.0", | |||
"drupal/cshs": "^4.0", | |||
"drupal/dashboard": "^2.0@alpha", |
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.
"drupal/dashboard": "^2.0@alpha", | |
"drupal/dashboard": "^2.0", |
id: dashboard | ||
label: Dashboard |
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.
There may be more dashboards in the future? Calling this "Home Dashboard" or "Main Dashboard" could help future-proof.
- stanford_migrate | ||
- hs_capx |
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.
- stanford_migrate | |
- hs_capx | |
- stanford_migrate | |
- hs_capx | |
- dashboard |
I'd add the dashboard module as a dependency.
/** | ||
* Announcement CSV location. | ||
*/ | ||
const ANNOUNCEMENTS_CSV = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vTQzSuPudq048D1NadRBE9h_s_-w-o4YtcC6AHfCdcqn3gX52akZNOaF5KAG9SeXkCV6PvIVmRtQ0HR/pub?gid=1146337887&single=true&output=csv'; |
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.
Could this be configurable instead of hard-coded? Doesn't have to be exposed via a form but then it could be changed with a config set and not a code push if ever necessary.
]; | ||
} | ||
|
||
\Drupal::cache()->set('hs_dashboard_csv_announcements', $table_rows, time() + 120); |
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.
~2 minutes seems a bit high. Maybe 5-10? I'm not sure what would be optimal here. ~ See other comment on the block about using cachetags and moving the rendering to the block and caching that.
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
/** | ||
* Provides a hsdp announcements block. |
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.
* Provides a hsdp announcements block. | |
* Provides an HSDP announcements block. |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function build(): array { |
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.
Ideally the table (headers and rows) would be built and cached separately in the build()
method here instead of in the service. The cache would use a cacheTag. The service would be isolated to making the necessary API call and returning the data. If the data hasn't changed (which a hash could be used based on the data in the API call) it wouldn't re-render/build the block but return the already rendered table.
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function build(): array { |
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.
Same idea as the Announcements block and service here. The table should be rendered and cached in this build method and the service should be used for returning the data.
@@ -0,0 +1,179 @@ | |||
/* Dashboard */ |
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 saw this issue in the queue for the dashboard module: https://www.drupal.org/project/dashboard/issues/3490876
Hopefully it will provide better support for the gin admin theme.
Summary
A Sandbox with the Dashboard module for further experimentation.