Skip to content

Improve Views UX: select filter for sentiments, language filter, and standardize submit button#23

Merged
jjroelofs merged 1 commit into1.xfrom
feature/improve-views-ux
Jan 5, 2026
Merged

Improve Views UX: select filter for sentiments, language filter, and standardize submit button#23
jjroelofs merged 1 commit into1.xfrom
feature/improve-views-ux

Conversation

@jjroelofs
Copy link
Copy Markdown
Contributor

@jjroelofs jjroelofs commented Dec 24, 2025

Summary

  • Convert sentiments_id filter from text input to select dropdown using analyze_select plugin
  • Add exposed language filter using node relationship, defaulting to site's default language
  • Change submit button text to "Apply filters" for consistency across analyze modules
  • Add getSentimentOptions() method for filter options
  • Consolidate update hooks into single hook_update_8002

Test plan

  • Run drush updb to apply update hook
  • Run drush cr to rebuild caches (required for Views to recognize the new filter plugin)
  • Verify sentiments filter is now a dropdown
  • Verify language filter appears and defaults to site's default language
  • Verify submit button shows "Apply filters"

Closes #22

- Convert sentiments_id filter from text input to select dropdown
- Add exposed language filter using node relationship, defaulting to site default
- Change submit button text to "Apply filters" for consistency
- Add getSentimentOptions() method for filter options
- Consolidate update hooks into single hook_update_8002

Closes #22
@jjroelofs jjroelofs force-pushed the feature/improve-views-ux branch from a4c7bb3 to 16ea895 Compare December 24, 2025 15:37
@jjroelofs jjroelofs merged commit f6028b1 into 1.x Jan 5, 2026
2 checks passed
jjroelofs pushed a commit that referenced this pull request Jan 28, 2026
- Add hook_update_8003 for view enhancements
- Add analyzed_timestamp field with time ago format
- Add created field with time_diff enabled
- Enable time_diff on changed field (shows relative time)
- Add content type filter
- Change default sort from created to changed
- Standardize field ordering across views
- Refactor SentimentsStorageService to use merge/upsert pattern
- Add user module dependency and user.permissions cache context
- Clean up filters and remember_roles

Follow-up to #23 (Improve Views UX)
jjroelofs added a commit that referenced this pull request Jan 28, 2026
…24)

* Improve Views UX part 2: time_diff, fields, and storage optimization

- Add hook_update_8003 for view enhancements
- Add analyzed_timestamp field with time ago format
- Add created field with time_diff enabled
- Enable time_diff on changed field (shows relative time)
- Add content type filter
- Change default sort from created to changed
- Standardize field ordering across views
- Refactor SentimentsStorageService to use merge/upsert pattern
- Add user module dependency and user.permissions cache context
- Clean up filters and remember_roles

Follow-up to #23 (Improve Views UX)

* Fix linting: break long comment line, simplify return

* Fix array formatting for Drupal coding standards

---------

Co-authored-by: Jurriaan Roelofs <jur@dxpr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Views UX: select filter for sentiments, language filter, and standardize submit button

1 participant