Skip to content
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

Open
wants to merge 19 commits into
base: 11.8.1-release
Choose a base branch
from

Conversation

dalin-
Copy link
Collaborator

@dalin- dalin- commented Nov 21, 2024

Summary

A Sandbox with the Dashboard module for further experimentation.

@ahughes3 ahughes3 temporarily deployed to Tugboat November 21, 2024 20:51 Destroyed
@dalin- dalin- requested a review from ahughes3 November 21, 2024 20:51
@ahughes3 ahughes3 temporarily deployed to Tugboat November 22, 2024 19:01 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat December 4, 2024 04:05 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat December 4, 2024 04:07 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat December 11, 2024 18:01 Destroyed
@ahughes3
Copy link
Collaborator

@dalin- This PR was helpful! I think we can close it now that we have #1697

@dalin-
Copy link
Collaborator Author

dalin- commented Dec 13, 2024

@ahughes3
cc @cienvaras
I think we still need a long-running branch to merge all of our dashboard tickets into. We don't want the dashboard to appear on the live site until we've reached a critical mass of approved blocks.

@ahughes3
Copy link
Collaborator

I agree with that, thank you!

@ahughes3 ahughes3 temporarily deployed to Tugboat December 14, 2024 00:29 Destroyed
@cienvaras cienvaras changed the base branch from develop to 11.6.1-release December 14, 2024 00:29
* 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>
@ahughes3 ahughes3 temporarily deployed to Tugboat December 17, 2024 19:26 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat January 6, 2025 17:57 Destroyed
Base automatically changed from 11.6.1-release to develop January 8, 2025 16:39
@ahughes3 ahughes3 temporarily deployed to Tugboat January 13, 2025 20:00 Destroyed
@cienvaras cienvaras changed the base branch from develop to 11.6.3-release January 21, 2025 00:26
Base automatically changed from 11.6.3-release to develop January 22, 2025 16:25
@ahughes3 ahughes3 temporarily deployed to Tugboat January 27, 2025 17:04 Destroyed
@cienvaras cienvaras changed the base branch from develop to 11.6.4-release January 27, 2025 17:04
@ahughes3 ahughes3 temporarily deployed to Tugboat February 3, 2025 15:23 Destroyed
Base automatically changed from 11.6.4-release to develop February 6, 2025 16:51
@cienvaras cienvaras changed the base branch from develop to 11.7.1-release February 10, 2025 21:17
* 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>
@ahughes3 ahughes3 temporarily deployed to Tugboat February 11, 2025 23:30 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat February 11, 2025 23:52 Destroyed
)

* 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>
@ahughes3 ahughes3 temporarily deployed to Tugboat February 12, 2025 00:11 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat February 12, 2025 00:23 Destroyed
@cienvaras
Copy link
Collaborator

@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!

Copy link
Collaborator Author

@dalin- dalin- left a 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.

Copy link
Collaborator Author

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.

Copy link
Contributor

@joegl joegl Mar 3, 2025

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>
@ahughes3 ahughes3 temporarily deployed to Tugboat February 20, 2025 16:45 Destroyed
Base automatically changed from 11.7.1-release to develop February 20, 2025 17:59
@cienvaras cienvaras changed the base branch from develop to 11.8.1-release February 21, 2025 23:14
@ahughes3 ahughes3 temporarily deployed to Tugboat February 21, 2025 23:15 Destroyed
@ahughes3 ahughes3 temporarily deployed to Tugboat February 25, 2025 20:59 Destroyed
* 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>
@@ -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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"drupal/dashboard": "^2.0@alpha",
"drupal/dashboard": "^2.0",

Comment on lines +16 to +17
id: dashboard
label: Dashboard
Copy link
Contributor

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.

Comment on lines +7 to +8
- stanford_migrate
- hs_capx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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';
Copy link
Contributor

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);
Copy link
Contributor

@joegl joegl Mar 3, 2025

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Provides a hsdp announcements block.
* Provides an HSDP announcements block.

/**
* {@inheritdoc}
*/
public function build(): array {
Copy link
Contributor

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 {
Copy link
Contributor

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 */
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants