discourse-data-explorer/lib/discourse_data_explorer
锦心 760667d744
FIX: Param should be displayed when the default value is invalid (#313)
What's the problem?
===================

TL;DR: When the user enters an incorrect default value, its
corresponding param-input will disappear

When creating a parameter from SQL, we perform cast_to_ruby, which means
that if the default value given by the user is invalid, the entire
parameter will not be added to the param_list of the query.
This behavior is very confusing, and users will not understand why an
incorrect initial value will cause the param-input to disappear.

What's the fix?
================

The cast_to_ruby process is canceled in create_from_sql, so that
param-input with incorrect default value will still be displayed.
We have a simple validation process on the front end, which is enough to
prompt whether some default inputs are incorrect.
2024-08-21 12:03:11 +08:00
..
data_explorer.rb DEV: Update rubocop-discourse to version 3.8.0 (#292) 2024-05-28 11:16:14 +02:00
engine.rb DEV: Update plugin to match latest guidelines (#229) 2023-03-22 23:29:08 +02:00
parameter.rb FIX: Param should be displayed when the default value is invalid (#313) 2024-08-21 12:03:11 +08:00
queries.rb FEATURE: add instant run-off voting export query (#294) 2024-07-17 14:45:40 +02:00
query_group_bookmarkable.rb DEV: Adapt to core bookmark changes (#280) 2024-02-29 09:11:40 +10:00