Skip to content

Implement Pinned Apps feature on dashboard homepage#5324

Open
iliketocode2 wants to merge 5 commits into
OSC:masterfrom
iliketocode2:feature/custom-pinned-apps
Open

Implement Pinned Apps feature on dashboard homepage#5324
iliketocode2 wants to merge 5 commits into
OSC:masterfrom
iliketocode2:feature/custom-pinned-apps

Conversation

@iliketocode2
Copy link
Copy Markdown
Contributor

Summary

I am requesting to add a “Pinned Apps” widget editor to the dashboard homepage. Users can open an editor popup from the Pinned Apps section, search/select apps to pin, select all, clear all, reset to system defaults, and save or cancel changes. The widget maintains a max height with overflow scrolling, and keeps all of the original/existing OOD app card styling/launch behavior.

  • Note 1: Custom pinned apps are stored as a per-user override list; so if they are unset the system default pinned apps configuration continues to apply.
  • Note 2: Saving an empty selection keeps the Pinned Apps section visible so users can add in their pinned apps later.
    Implementation

Files:

  • apps/dashboard/app/controllers/application_controller.rb: Resolve @pinned_apps from user_settings[:custom_pinned_apps] when present; otherwise use @user_configuration.pinned_apps.
  • apps/dashboard/app/controllers/pinned_apps_controller.rb: New controller to update (PATCH /pinned_apps) and reset (DELETE /pinned_apps) which acts as the per-user pinned apps override. The submitted tokens are filtered to make sure they are valid navigation app cards.
  • apps/dashboard/app/models/concerns/user_setting_store.rb: Added clear_user_setting helper to remove a single key from the user settings YAML which persists.
  • apps/dashboard/app/helpers/dashboard_helper.rb: Added helpers for editor options/selection and pinned_apps_widget_visible? so the widget editor remains accessible even when the saved selection is empty.
  • apps/dashboard/app/views/widgets/_pinned_apps.html.erb: Header now includes an Edit button and also the pinned apps list is wrapped in a max-height scroll container in case users choose a lot of apps to pin.
  • apps/dashboard/app/views/dashboard/index.html.erb: Added a Bootstrap modal that provides the pinned apps editor UI (search, select all, clear all, reset, save/cancel).
  • apps/dashboard/app/javascript/pinned_apps.js: Added popup behaviors (search filtering, select/clear visible items) and kept the existing launcher spinner behavior.
  • apps/dashboard/app/assets/stylesheets/pinned_apps.scss: Added styling for header layout, scrollable grid/modal list, and fixed checkbox clipping inside the modal list.
  • apps/dashboard/config/routes.rb: Added resource :pinned_apps routes.
  • apps/dashboard/config/locales/{en,ja_JP,zh-CN}.yml: Added strings for the editor UI.

Tests

  • Existing pinned apps integration coverage remains valid. (Locally validated via test/integration/pinned_apps_test.rb during development.)

What still needs to be implemented

  • apps/dashboard/config/locales/ja_JP.yml and apps/dashboard/config/locales/zh-CN.yml currently have placeholder values.

Results

Initial landing screen on the Tufts Cluster:
image

Clicking the "Edit" button to bring up the popup:
image

Keyword filtering:
image

Saving new pinned apps and a display of app overflow:
image

No pinned apps selected:
image

Confirmation to reset to system default:
image

Copy link
Copy Markdown
Contributor

@Bubballoo3 Bubballoo3 left a comment

Choose a reason for hiding this comment

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

I think this is a nice feature that people will appreciate, there are two main points that I think require further planning or breaking this into multiple steps.

First, UserSettingsStore is currently only used for user-level settings that are configured by admins, so we likely want a new or at least forward-thinking and well planned approach to handle user-provided user-level settings. That's not to say 100% that this isn't the right place, just that it will take us some careful consideration to determine.

Second, I think you can use some of the system provided partials and functionality to accomplish what you are trying to do. There are other places we use modals, for example, so you should be able to use that for some of your styles and html to avoid duplication.

Since we are very busy with the final stages of the 4.2 release, it may be some time before we are able to put in the time necessary to fully review this. But if you get a chance to look into these points and find ways to make it simpler in the mean time, that will speed things up down the road.

Comment thread apps/dashboard/config/locales/ja_JP.yml Outdated
path_selector_parent_directory: 親ディレクトリ
pinned_apps_caption_html: <a href="%{all_apps_url}">すべての利用可能なアプリ</a>の中から特集されたサブセット
pinned_apps_category: アプリ
pinned_apps_clear_all: Clear All
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You only need to update en.yml with new internationalizations. We have automations to handle updating other languages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good to know, thanks.

@iliketocode2
Copy link
Copy Markdown
Contributor Author

First, UserSettingsStore is currently only used for user-level settings that are configured by admins, so we likely want a new or at least forward-thinking and well planned approach to handle user-provided user-level settings. That's not to say 100% that this isn't the right place, just that it will take us some careful consideration to determine.

Ok, sounds good I am thinking that some sort of similar architecture (just another UserLocalStore cache if it needs to be separate or if we really want to expand OOD functionality an entire user settings feature) would work well. Having user settings is something I've been considering since it helps with accessibility as well.

Second, I think you can use some of the system provided partials and functionality to accomplish what you are trying to do. There are other places we use modals, for example, so you should be able to use that for some of your styles and html to avoid duplication.

Yes, that makes a lot of sense, I'll go back through and see where I can reuse code from across other modals.

Since we are very busy with the final stages of the 4.2 release, it may be some time before we are able to put in the time necessary to fully review this. But if you get a chance to look into these points and find ways to make it simpler in the mean time, that will speed things up down the road.

Overall sounds great, thank you for taking the time to look this over; I really appreciate it! I'll keep adding work here so hopefully when we come back to it the code will be in a good state to merge/discuss further.

@moffatsadeghi moffatsadeghi added community/request Issues submitted by OOD community members and removed community/request Issues submitted by OOD community members labels Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Awaiting Review

Development

Successfully merging this pull request may close these issues.

4 participants