zulip/web
Sahil Batra 7258a2caaf settings: Fix save-discard widget handling for code block language.
The save-discard was not being hidden properly in the below case-
- The "Default language for code blocks" setting was disabled
initially (i.e. the "Disable" option was selected in the dropdown),
meaning there was not default language set.
- The setting is then udpated to "javascript" and the save-discard
widget is shown as expected.
- The setting is then again change to "Disable" option.

The save-discard widget should have been hidden after the last
step, but it does not.

This was because while comparing the old and new value, the new
value (obtained using get_dropdown_list_widget_setting_value) was
computed as "null" while the old value (obtained from page_params)
was an empty string "". This commit fixes the bug by changing
get_dropdown_list_widget_setting_value to return empty string "",
instead of null, when the "Disable" option is selected in the
dropdown.

The "get_dropdown_list_widget_setting_value" function was returning
null previously, as we supported both null and empty string "" to
represent the state of no language selected, with null being the
initial value and empty string being used if user changed the
setting to some language and then disabled it again.
This was changed in #26275 and the state of not setting any default
language for code blocks is now represented using empty string in
all cases.
2023-08-06 17:53:57 -07:00
..
e2e-tests settings_org: Migrate dropdowns to new DropdownWidget. 2023-07-27 14:10:08 -07:00
generated web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
html web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
images styles: Remove Firefox override for dropdown appearance. 2023-07-24 13:10:03 -07:00
shared poll_data: Revert to using "canned" instead of -1. 2023-07-20 09:55:09 -07:00
src settings: Fix save-discard widget handling for code block language. 2023-08-06 17:53:57 -07:00
styles print: Try to keep message headers with messages. 2023-08-06 13:27:40 -07:00
templates settings: Fix save-discard widget fo. 2023-08-06 17:53:57 -07:00
tests settings: Add a saving-saved indicator to the 'SETTINGS/TOPICS' UI. 2023-08-06 13:55:21 -07:00
third bootstrap: Remove bootstrap CSS for blockquote elements. 2023-07-23 15:44:58 -07:00
.browserslistrc webpack: Move webpack configuration to web. 2023-02-24 06:35:58 -08:00
.gitignore web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
babel.config.js dependencies: Upgrade JavaScript dependencies. 2023-07-21 15:58:42 -07:00
debug-require-webpack-plugin.ts web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
debug-require.js web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
postcss.config.js postcss: Enable postcss-preset-env. 2023-03-20 11:26:30 -07:00
webpack.assets.json ts: Convert web/src/billing module to TypeScript. 2023-06-23 11:42:29 -07:00
webpack.config.ts dependencies: Upgrade JavaScript dependencies. 2023-06-05 21:51:26 -07:00
webpack.dev-assets.json webpack: Move webpack configuration to web. 2023-02-24 06:35:58 -08:00