Commit Graph

339 Commits

Author SHA1 Message Date
Krzysztof Kotlarek 19e2a21444 FIX: improve queries migration to persist IDs 2020-09-03 16:34:29 +10:00
Krzysztof Kotlarek 16873e708a FIX: dont error when user id is empty string 2020-08-27 14:47:43 +10:00
Krzysztof Kotlarek 0a694215f8 FIX: dont error when user is blank 2020-08-27 14:16:39 +10:00
Krzysztof Kotlarek 7696d459a4 FIX: dont error when json don't contain hidden key 2020-08-27 12:29:27 +10:00
Guo Xiang Tan 353da45b6f
Fix failing test. 2020-08-27 09:36:51 +08:00
Guo Xiang Tan 79e8596332
Make rubocop happy. 2020-08-27 09:19:59 +08:00
Krzysztof Kotlarek fe0806eb2a
FEATURE: introduce data-explorer tables (#61)
Instead of using `PluginStoreRow` we should use plugin-specific models like `DataExplorer::Query` and `DataExplorer::QueryGroup`
2020-08-27 10:29:57 +10:00
Rishabh fe420931ba
FIX: Use updated routes to link user profiles (#60)
FIX links to user profiles from the old route `/users/` to the new route `/u/`.
2020-08-18 11:31:05 +02:00
AndreaHabib 8bdfd845db
UI: Fixed missing text above query list for sorting (#58)
* changed directory-toggle to table-header-toggle which fixed the issue
2020-08-11 12:17:36 -05:00
Discourse Translator Bot 775e4ec499 Update translations 2020-08-11 13:02:43 +00:00
Mark VanLandingham 5bf875a1ac
FIX: Do not show hidden queries in group reports (#57) 2020-08-10 15:12:06 -05:00
Gerhard Schlager e7cc6310d7 DEV: Remove mention of Transifex from locale files 2020-08-06 13:34:32 +02:00
Discourse Translator Bot 3ef3d0bc74 Update translations 2020-08-05 13:25:51 +00:00
Penar Musaraj 5a99501d88
DEV: Use CSS custom properties for colors in SCSS
Prepares the plugin for an upcoming change in core while maintaining
backwards compatiblity.
2020-08-03 21:21:23 -04:00
Ricky Chon dcfb92d7f8
FEATURE: Add ability to soft delete (hide) queries and revert deletion with rake tasks (#54)
* FEATURE: Add hide button (toggleable) for all queries (frontend only)

* Switches between hide/unhide on click
* Works almost like the delete button, but toggles between the query's
hidden attribute instead
* So far this is only a frontend feature, the backend implementation
still needs work

* Revert "FEATURE: Add hide button (toggleable) for all queries (frontend only)"

This reverts commit a8771d2ad5.

REVERT: Remove button that hides queries (frontend)

* Prepare for migration of old frontend logic to backend
* We are going to reuse the existing delete button, but change its
backend logic to enable soft deletion. From the user's perspective
nothing will change, but any deletion mistakes can be reverted.

* DEV: Hide user queries upon deletion, but keep them in store

* Creating a new query will set its hidden attribute to false by
default
* Deleting a user-made query will not delete it from the store, but
set its hidden attribute to true
* User queries will not be indexed if they are hidden
* Undeleting a query will unhide it, and will be indexed
* Updating a hidden query will unhide it, and will be indexed

* SPEC: Add spec for hidden/deleted queries

* Hidden queries should not be shown

* FEATURE: Add ability to delete/hide system queries

* System queries are now able to be deleted from view, but will remain
in the backend for retrieval, if necessary

* FEATURE/DEV: Add rake commands for query soft deletion

* query:list_hidden - Shows a list of hidden queries
* query:hide_all[only_default] - Hides all queries, w/ boolean arg to
hide only default ones
* query:unhide[id] - Unhides a query by id
* query:unhide_all[exclude_default] - Unhides all hidden queries,
w/ boolean arg to exclude default ones

* Remove rails loggers

* UX/DEV: Update query rake tasks to be more user friendly

* Split query:hide_all[only_default] into two tasks:
    * query:hide_all - Hides all queries
    * query:hide_all:only_default - Hide only default queries
* Split query:unhide_all[exclude_default] into two tasks:
    * query:unhide_all - Unhides all hidden queries
    * query:unhide_all:exclude_default - Unhides all non-default
    queries
* Rename file to match task name

* UX: query:unhide can accept multiple arguments

* Example: rake query:unhide[-5,-6,-7,3,5,6,-13,-14,-10]

* UX: Update query rake tasks to output cleaner messages

* Remove unneeded comment

* DEV: Keep only necessary rake tasks, use more specific naming

* UX/DEV: Add rake task for hard deletion, better console logs

* User is able to hard delete a query only if it is hidden, otherwise
output a message stating so
* Add commented examples above each task
* Add rainbow support for more readable console logs
* Successful messages will display green, failures display red,
additional info displays yellow
* Separate multiple queries with spaces instead of lines

* DEV: Remove rainbow colorizing in console logs

* Rainbow is a dependency of rubocop and it may go away in the future
* Rainbow is only used for dev and test environments

* DEV: Add Rails engine to enable rake tasks to be loaded at runtime

* DEV: Favor require - load files only if they are not already loaded

* SPEC: Add tests for data_explorer[id] rake command

* Test if a single query is hidden correctly
    * Expect length of query list to not be modified
    * Expect array of hidden queries to have exactly 1 element
    * Expect that one element to have the same ID as the one invoked to
    be hidden
* Test if multiple queries are hidden correctly
    * Expect length of query list to not be modified
    * Expect array of hidden queries to have the number of elements
    equal to the number invoked to be hidden
    * Expect the elements to have the same ID as the ones invoked to be
    hidden
* Test if a query exists in PluginStore
    * Expect query list to be empty

* DEV: Clear pre-existing tasks before redefining

* This prevents double invocation when user invokes the task once

* SPEC: Add tests for unhide_query rake task

* Test if a single query unhides correctly
    * Expect length of query list to not be modified
    * Expect array of hidden queries to have exactly 1 element after
    unhiding 1 of 2 queries
    * Expect remaining element to be hidden
* Test if multiple queries unhide correctly
    * Expect length of query list to not be modified
    * Expect array of hidden queries to have exactly 1 element after
    unhiding 3 of 4 queries
    * Expect remaining element to be hidden
* Test if a query exists in PluginStore
    * Expect query list to not be modified

* SPEC: Add tests for hard_delete rake task

* Test if a single query hard deletes correctly
    * Expect length of query list to be shorter by 1
    * Expect array of hidden queries to have exactly 1 element after
    hard deleting 1 of 2 queries
    * Expect 1 remaining hidden element
* Test if multiple queries hard delete correctly
    * Expect length of query list to be shorter by 3 after hard deleting
    3 of 4 queries
    * Expect array of hidden queries to have exactly 1 element after
    hard deleting 3 of 4 queries
    * Expect 1 remaining hidden element
* Test if a query exists in PluginStore
    * Expect hidden query list to not be modified
* Test if a query is not hidden
    * Expect query list to not be modified

* UX: Favor newline char in place of puts for logs

* Condensed console logs to output newline char instead of another puts
statement (reduces number of lines used significantly)
2020-07-29 16:50:24 +10:00
Discourse Translator Bot ab1ec9cb69 DEV: Switch from Transifex to Crowdin 2020-07-16 14:00:47 +02:00
Robin Ward 0c1a9aa4bc FIX: deprecations 2020-07-06 15:25:19 -04:00
Neil Lalonde fc041d8b4a
Update translations 2020-06-24 11:41:20 -04:00
tshenry f04422244d
FIX: missing default params group reports (#50) 2020-06-05 09:56:53 -07:00
tshenry 0dcaa990b4
UX: minor share report popup improvements (#49) 2020-06-03 16:39:12 -07:00
Gerhard Schlager 159a52100f DEV: Use consistent interpolation key format in translations 2020-06-02 19:22:46 +02:00
Robin Ward c0a0679caf Upgade yarn 2020-05-28 14:46:19 -04:00
Neil Lalonde 520827044e
Update translations 2020-05-27 16:54:28 -04:00
Michelle Saquetim 5cce9caefd FIX: Add queries description 2020-05-20 16:42:53 +01:00
Michelle Saquetim 2d075fd98c
FIX: Remove a extra blank line 2020-05-20 15:07:14 +01:00
Michelle Saquetim 13094992c9
Add query number of replies by category 2020-05-20 13:13:04 +01:00
Michelle Saquetim c86440a56d
Add query top tags per year 2020-05-20 13:11:36 +01:00
Robin Ward 492d189c6e DEV: Discourse.Route is deprecated 2020-05-12 14:41:26 -04:00
jjaffeux 2c11e386f1 DEV: Move to rubocop-discourse. 2020-05-06 18:11:07 +02:00
Joffrey JAFFEUX 9297885629
FIX: ensures backward compat with previous findRawTemplate (#48)
To my knowledge we don't implement `requirejs.defined` so I rely on the __DISCOURSE_RAW_TEMPLATES constant which has been introduced in the commit where we moved from discourse/lib/raw-template to discourse-common/lib/raw-templates.
2020-05-06 15:20:37 +02:00
Neil Lalonde 676dc40031
Update translations 2020-05-04 10:49:51 -04:00
Vinoth Kannan cfe6452d11 SPEC: limit maximum number of rows correctly.
96a8d1862e
2020-02-26 16:00:15 +05:30
Neil Lalonde 69c5423942 Update translations 2020-02-25 10:33:22 -05:00
Vinoth Kannan 96a8d1862e FIX: limit maximum number of CSV rows correctly.
bbea8884db
2020-02-24 10:53:48 +05:30
Vinoth Kannan bbea8884db FIX: `limit` parameter value `ALL` should work for JSON exports.
183bc26763
2020-02-24 10:28:22 +05:30
Vinoth Kannan 183bc26763 DEV: set limit for maximum no of rows in CSV exports. 2020-02-20 23:34:15 +05:30
Penar Musaraj 277346b097 DEV: Find/replace deprecated decorators 2020-02-19 11:57:59 -05:00
Neil Lalonde 150744ab20 Update translations 2020-02-13 15:05:47 -05:00
Joffrey JAFFEUX df9e21911e FIX: makes group selector works with sk2 (#46) 2020-02-10 08:37:20 +01:00
Arpit Jalan 16ea1c55a9 FIX: download CSV feature was not working for group reports 2020-01-21 15:16:15 +05:30
Neil Lalonde aebd8dc6e4 Update translations 2020-01-20 11:21:43 -05:00
Sam Saffron 7e21634987 lint file 2020-01-13 10:43:30 +11:00
Blake Erickson 6707072ef1 FIX: Remove buffered-render reference
Buffered-render has been removed from core, so this change allows us to
keep the same functionality without using the render buffer.
2020-01-11 06:04:14 -07:00
Blake Erickson d2ac25857f FIX: Remove component file
This file is no longer necessary.

Follow up to: 45fbba08fc
2020-01-10 18:34:24 -07:00
Blake Erickson 45fbba08fc DEV: Remove buffered render code
The render buffer code is being removed from core, so we need to remove
it's usage from this plugin. This change is a refactor only and should
not break any functionality.
2020-01-10 16:20:40 -07:00
Penar Musaraj 86516dadbb DEV: replace "warning" icons with "exclamation-triangle" 2020-01-06 12:52:27 -05:00
Mark VanLandingham d811b0c7a3 FIX: Use i18n for allow groups label (#44) 2020-01-06 12:08:35 +01:00
Neil Lalonde af7cfb2390 Update translations 2019-12-19 12:50:47 -05:00
tshenry 02f4277f3d UX: Improve info popup overflow
Some of the longer variable names were overflowing. This commit is a follow-up to: https://github.com/discourse/discourse-data-explorer/pull/45
2019-12-09 09:02:32 -08:00
tshenry 6393831b0b FEATURE: Additional enums (#45)
Data explorer displays special information about various enums, this flags more fields that we know are enums leading to a clearer UX.
2019-12-09 14:20:34 +11:00