Commit Graph

35 Commits

Author SHA1 Message Date
Linca 8a982beae9
UX: Automatically convert to lowercase in explorer-schema (#325)
* UX: Automatically convert to lowercase in explorer-schema

In the past, ExplorerSchema searches were case-sensitive, so if the
user's input method capitalized the first letter, it was likely that no
results would be found.

The new change allows you to enter uppercase letters, which will
automatically be converted to lowercase when searching.

meta topic: https://meta.discourse.org/t/can-the-data-explorer-search-input-be-converted-to-lower-case/323435
2024-09-02 12:02:36 +08:00
Jarek Radosz f62d8cc8a2
DEV: Update tests (#323)
new imports, resolved deprecations, qunit-dom, strict assertions, fixed flakes, migrated the legacy component test, typos, gjs
2024-08-28 13:51:37 +02:00
锦心 68760cd3a5
UX: Rewrite date/time param-input using FormKit (#316)
This commit changes the date/time input (including `date`, `time`, and
`datetime` types) to the date/time input provided by FormKit.
2024-08-22 23:24:12 +08:00
锦心 24bd4ba099
UX: Use GroupChooser in `group_id` param input (#315)
This commit uses GroupChooser as the input for param input of type
group_id. Meanwhile, it improves invalid group validation and semantic
error prompts.
2024-08-22 17:46:12 +08:00
锦心 b47ba7ea60
DEV: Use Category's async method in param-input (#310)
This commit refactors the category id normalization of param-input to
use `Category.asyncFindBySlugPath`.

Now, the category id input will use an async query when the
default/initial value is category slug.

Co-authored-by: Natalie <1555215+nattsw@users.noreply.github.com>
2024-08-21 15:41:02 +08:00
锦心 6d179745ec
FIX: Empty param-inout form should reject submit (#309)
The `onSubmit` hook will only be triggered when the form is valid, so we
need to clear the contents of `serializedData` in advance in `submit`.
Otherwise, it may not throw a validation error.
2024-08-20 10:09:48 +08:00
锦心 5080ce9b1f
UX: Rewrite param-input using FormKit (#307)
What does this PR do?
=====================

This PR refactors param-input to use FormKit. FormKit is a structured
form tool in the core. After the rewrite, we will be able to get semantic 
parameter error prompts, etc.

meta link: https://meta.discourse.org/t/wishlist-param-dropdown-for-data-explorer-query/253883/28?u=lhc_fl
2024-08-20 09:42:50 +08:00
锦心 902b8c7913
UX: Using CategoryChooser for param param_input (#306)
This change changes the category selector to use CategoryChooser instead
of a bare text input to improve the user experience.

Related meta link: https://meta.discourse.org/t/wishlist-param-dropdown-for-data-explorer-query/253883/28
2024-08-13 16:03:26 +08:00
锦心 e0bfa66f5f
FIX: Create parameter input boxes after save (#303)
What does this fix?
===================

When creating a data explorer query that includes parameters, the
parameter input boxes don’t display until the page is refreshed.

After this commit, when the query is saved, the input boxes will appear.

ref: t/113297
2024-08-05 15:58:51 +08:00
锦心 6d975d7e90
FEATURE: Add Data Explorer Params to the URL for group queries (#298)
We have introduced a URL param mechanism for data explorer queries for administrators
in https://github.com/discourse/discourse-data-explorer/pull/128/
However, for data explorer queries in group page, URL params are not yet introduced.

This PR introduces this missing piece.

Related meta topic: https://meta.discourse.org/t/populate-data-explorer-params-with-url-params/169404/8
2024-07-05 17:49:18 +08:00
Jarek Radosz e067df0b43
DEV: Update linting (#267) 2023-12-01 16:47:54 +01:00
Renato Atilio 840caa3987
DEV: add leading slash to `visit` in test (#266) 2023-11-23 16:34:09 -03:00
Jarek Radosz e468cf8ab0
DEV: Update `visit` paths in tests (#265)
Omitting `/` prefix was incorrect and could break in the future (see: https://github.com/discourse/discourse/pull/24445)
2023-11-21 22:23:35 +01:00
Kris f83e6a1967
DEV: fix test for new category badge structure (#263) 2023-11-13 10:46:40 -05:00
Jan Cernik 2144e7b3ba
FIX: Show "false" and "0" in query result (#244) 2023-05-04 19:45:43 -03:00
Isaac Janzen 556d12ac50
FIX: Maintain editing state after saving query changes (#223)
In the widget version of the data-explorer we would maintain the `editing` state after saving query changes. This was lost in upgrade to glimmer. 

# Current State
https://user-images.githubusercontent.com/50783505/217622464-79adaab6-84ed-4b64-93ae-c889aa8fb1bd.mp4

# Updated State
https://user-images.githubusercontent.com/50783505/217623475-1998fab6-0b70-42d2-923d-574efb9d5601.mov

# Other Changes
- `createProperties` was added back to the `query` model as it is being utilized in the creation of a new data explorer query. This was accidentally removed and was causing errors when trying to create a new query.
- Add new-query test
2023-02-08 13:40:53 -06:00
Isaac Janzen ac6b0467a1
DEV: Update params for group reports (#207)
During the upgrade to Octane group reports did not have the necessary 'updateParams' function added to have the param input changes bubble up to the parent. This PR adds the missing function as well as a small test to check that params can be inputted as expected (inserting a param would error previously).
2022-12-28 09:50:55 -06:00
Isaac Janzen 3e7605d8a0
DEV: Update params to use previously ran values on reload (#206)
After running a query with a non-default query param (inserting the new param into the url) we want to have the same params available after reloading the page. To do this we need to pass the updated params back up to the parent due to Octane's one direction data stream. I went over this with @pmusaraj and we both agreed this was extremely difficult to test due to needing to reload the page in a test, so we opted to move forward without one. A system test could be helpful in this case... I will investigate in a follow up PR.

- Move param-input tests to a dedicated file
2022-12-27 12:10:29 -06:00
Isaac Janzen 85c88c5d80
DEV: Better handling of no results (#205)
When there were no query results it would throw an error due to `this.resultCount` always passing as it is in the format of

```
"INTEGER - results returned"
```

so we need to grab the first index of the string and check if the integer is great than 0
2022-12-20 16:55:11 -06:00
Isaac Janzen 4c70cfa100
Upgrade `query-result` to Octane (#204)
* Upgrade query-result to Octane
2022-12-20 12:09:37 -06:00
Isaac Janzen bd602b02a0
Add test for category result (#200) 2022-12-15 11:35:18 -06:00
Isaac Janzen 479d51faf0
Add followup test for displaying post in query results (#198) 2022-12-14 12:09:25 -06:00
Jarek Radosz 07e009e862
DEV: Update linting setup and fix issues (#179) 2022-06-17 15:01:34 +02:00
Jarek Radosz 86cda5f213
DEV: Lose the es6 suffix (#165) 2022-03-05 17:21:01 +01:00
David Taylor 2a17f49f66 DEV: Bump eslint-config-discourse and correct violations 2022-01-26 14:44:10 +00:00
Bianca Nenciu c6dd79c805
FIX: Do not stringify null parameters (#151)
Sometimes the query page did not load if one of the query was null
because it called null.toString() and raised an exception.
2022-01-17 13:45:40 +02:00
Jarek Radosz 545fb426f3
DEV: Make frontend tests work with ember-cli (#144) 2021-09-22 11:13:32 +02:00
Guhyoun Nam 286b5b5fe7
FEATURE: Add Data Explorer Params to the URL on run (#128)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2021-09-14 10:10:16 -05:00
Joffrey JAFFEUX ee3c6f4e2d
DEV: this class is no longer present in chart js 3.x (#132) 2021-08-23 11:04:40 +02:00
Jarek Radosz cf2735162a
DEV: Fix template linting issues (#124)
* Update test
* Remove the empty line in table
2021-07-05 23:15:57 +02:00
Andrei Prigorshnev cd232589e5
Add an acceptance test for the query list page (#110) 2021-04-15 11:23:09 +04:00
Andrew Prigorshnev 4f33c22344
FEATURE: Add a graph report to query results (#93) 2021-02-18 12:06:22 +01:00
Andrew Prigorshnev 9d86b8b653
FIX: Show badge names in query results (#92)
* FIX: Show badge names in query results
2021-02-12 10:01:16 +01:00
David Taylor 640fbbcdf5 Remove the empty js test file, to avoid confusion 2017-07-22 14:31:22 +01:00
Kane York 6a61f694ee Fix float type checks 2015-07-15 12:23:56 -07:00