Commit Graph
616 Commits
Author SHA1 Message Date
Sérgio Saquetim fe6934e1b0 DEV: Update compatibility for discourse-solved plugin to < 3.5.0.beta8-dev
Updated `.discourse-compatibility` to reflect compatibility with core version `< 3.5.0.beta8-dev`.
2025-07-21 23:30:55 -03:00
Sérgio Saquetim 23515467bd Merge branch 'main' into dev/post-quoted-content-component 2025-07-21 23:25:41 -03:00
Jarek Radosz e7b882d0d3 DEV: Re-add about.json (#385) 2025-07-21 17:20:10 +01:00
Jarek Radosz fca9d22750 DEV: Remove bundled plugins from about.json (#384) 2025-07-15 16:15:15 +01:00
Jarek Radosz 4f490c6d61 Revert "DEV: Deprecate the plugin (#382)" (#383)
This reverts commit 0ab400221d.
2025-07-15 10:25:35 +01:00
Jarek Radosz 0ab400221d DEV: Deprecate the plugin (#382) 2025-07-14 15:09:53 +01:00
Kris 0f03ec45c8 A11Y: improve expand/collapse labeling on embedded solution post (#381) 2025-07-10 16:21:49 -04:00
Kris e4b4a97d9e DEV: re-enable and update empty state tests (#380) 2025-07-09 13:58:35 -04:00
Kris 1d038963fd TEMP: skip tests due to core change (#379) 2025-07-09 10:24:06 -04:00
Natalie Tay f96aceb5f4 FIX: Use SolvedTopics to list posts in /activity/solved instead of user actions (#376)
In https://github.com/discourse/discourse-solved/pull/342 we moved solutions away from topic_custom_fields into proper tables, with the tables as the proper source of truth to a topic's solution.

The user's /my/activity/solved route uses user_actions which is not accurate, and a user has reported a bug where their solution is not reflected there (user actions are not a good representation of what a topic's solution is). 

This commit introduces 
- a new route to get solutions, and is mindful `hide_user_profiles_from_public` and such settings
- also mindful of PMs and private categories
- a new template that makes use of the `<UserStream>` to load posts safely and avoid reimplementation
2025-07-02 16:56:12 +08:00
Natalie Tay 041b58eed1 FIX: Exclude the first post itself when checking if an existing solution from the user exists (#378)
This commit makes sure to exclude the first solution when checking for an existing solution and has better tests -- the existing test does not accept the post prior to making the check.
2025-07-02 11:45:14 +08:00
Natalie Tay 0350b46bda FIX: Check if user has existing solution despite trust_level=any for first accepted solution validator used in automation (#377)
There exists a bug in the following trigger (see screenshot) where if the user has an existing solution already, they will still pass validation for "first accepted solution" due to the trust level being "any".
2025-06-30 15:40:16 +08:00
Sérgio Saquetim 47d24da9a7 DEV: Update has_accepted_answer property to track solution state 2025-06-24 16:23:18 -03:00
Sérgio Saquetim 0365e44a33 FIx failing tests 2025-06-24 16:21:40 -03:00
Discourse Translator Bot cee0ffc199 Update translations (#375) 2025-06-24 16:29:51 +02:00
Sérgio Saquetim 25920252f3 Fix linting issues 2025-06-24 01:31:09 -03:00
Sérgio Saquetim ea194b1f4f DEV: Update tests to use topic_with_op fabrication for topic consistency
This ensures tests work with topics that include an original post by default, improving test reliability and coverage. Adjustments were made to guardian_extensions_spec and solved_spec to reflect this.
2025-06-24 01:28:59 -03:00
Sérgio Saquetim 5aed0b41c5 FEATURE: Real-time updates for accepted and unaccepted solutions
Introduce real-time message bus updates for accepted and unaccepted solutions, ensuring live synchronization across users.

Key changes:
- Publish solution acceptance/unacceptance updates via MessageBus.
- Refactor `accepted_answer_post_info` and related logic for cleaner handling of accepted answer data.
- Update both backend and frontend to support reactive updates when solutions are toggled.
- Add loading states for Accept/Unaccept buttons to enhance UX during async operations.
2025-06-24 01:08:02 -03:00
dependabot[bot] adba4d9d6e Bump rack from 3.1.12 to 3.1.16 (#371)
Bumps [rack](https://github.com/rack/rack) from 3.1.12 to 3.1.16.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v3.1.12...v3.1.16)

---
updated-dependencies:
- dependency-name: rack
  dependency-version: 3.1.16
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-21 18:00:04 +02:00
Sérgio Saquetim 436ee57801 DEV: Refactor spec to improve readability of accepted answer tests
Refactored `solved_spec.rb` to make `accepted answer` assertions more explicit and structured. Consolidated selector handling and clarified expectation of the expanded quote behavior.
2025-06-20 19:07:55 -03:00
Sérgio Saquetim f03f64a33c DEV: Refactor topic model to use tracked properties for accepted answer logic
Refactored the `topic` model to replace legacy Ember property access (`get/set`) with modern tracked properties. Updated related logic in `add-topic-list-class` and `solved-unaccept-answer-button` to align with these changes.
2025-06-20 19:07:35 -03:00
Sérgio Saquetim 855745b4f8 DEV: Use the PostQuotedContent component to render the accepted answer
Refactored the `solved-accepted-answer` component to utilize the `PostQuotedContent` component, simplifying the structure and removing redundant code. Updated system tests to verify behavior of expandable accepted answer quotes. Added new compatibility entry for version `< 3.5.0.beta7-dev` and included TODO comments regarding event handling for Glimmer Post Stream.
2025-06-20 18:45:07 -03:00
Discourse Translator Bot 03804e1065 Update translations (#373) 2025-06-17 23:08:17 +02:00
Natalie Tay 4d20d83374 FIX: User directory for solutions should update when value changes from positive value to zero (#372)
# bug
If John created a post which is a solution in March, the user directory would show that John solution = 1.
In April, if John has not solved a topic, he would still have solution = 1 in the user directory.

# fix
reset solutions to 0 before updating
2025-06-11 10:46:36 +08:00
Jarek Radosz 94f0c5a315 DEV: Update linting config and run gjs-codemod (#370) 2025-06-05 11:40:00 +01:00
zhanfengzeng a7bc394bdc FEATURE: apply plugin modifier for answers controller rate limiting (#369) 2025-05-22 11:07:07 -05:00
David Taylor ba3d4276ee DEV: Fix linting violations (#367) 2025-05-16 13:24:01 +01:00
Sérgio Saquetim 8e72136f54 DEV: Add compatibility with the Glimmer Post Stream (#363) 2025-05-05 15:12:39 -03:00
David Taylor ae01ad30c3 DEV: Remove legacy topic-list code (#362) 2025-04-14 14:38:48 +01:00
Loïc Guitaut 4f0234f5be DEV: Add system spec to check core features are working fine (#357) 2025-04-09 14:27:30 +02:00