From f900d6cb7559e84730a027ba480af9505e541165 Mon Sep 17 00:00:00 2001
From: VarunMotiyani
Date: Wed, 13 Sep 2023 14:32:17 +0530
Subject: [PATCH 001/151] changed the searchbar to functional
---
.../IDE/components/Searchbar/Searchbar.jsx | 100 ++++++++----------
1 file changed, 47 insertions(+), 53 deletions(-)
diff --git a/client/modules/IDE/components/Searchbar/Searchbar.jsx b/client/modules/IDE/components/Searchbar/Searchbar.jsx
index a7c79d1f46..1c2217fd7a 100644
--- a/client/modules/IDE/components/Searchbar/Searchbar.jsx
+++ b/client/modules/IDE/components/Searchbar/Searchbar.jsx
@@ -1,71 +1,65 @@
+import React, { useState, useCallback, useEffect } from 'react';
import PropTypes from 'prop-types';
-import React from 'react';
import { throttle } from 'lodash';
import { withTranslation } from 'react-i18next';
import i18next from 'i18next';
import SearchIcon from '../../../../images/magnifyingglass.svg';
-class Searchbar extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- searchValue: this.props.searchTerm
- };
- this.throttledSearchChange = throttle(this.searchChange, 500);
- }
+const Searchbar = ({
+ searchTerm,
+ setSearchTerm,
+ resetSearchTerm,
+ searchLabel,
+ t
+}) => {
+ const [searchValue, setSearchValue] = useState(searchTerm);
- componentWillUnmount() {
- this.props.resetSearchTerm();
- }
+ const throttledSearchChange = useCallback(
+ throttle((value) => {
+ setSearchTerm(value.trim());
+ }, 500),
+ []
+ );
- handleResetSearch = () => {
- this.setState({ searchValue: '' }, () => {
- this.props.resetSearchTerm();
- });
+ const handleResetSearch = () => {
+ setSearchValue('');
+ resetSearchTerm();
};
- searchChange = () => {
- this.props.setSearchTerm(this.state.searchValue.trim());
+ const handleSearchChange = (e) => {
+ const { value } = e.target;
+ setSearchValue(value);
+ throttledSearchChange(value.trim());
};
- handleSearchChange = (e) => {
- this.setState({ searchValue: e.target.value }, () => {
- this.throttledSearchChange(this.state.searchValue.trim());
- });
- };
+ useEffect(() => {
+ setSearchValue(searchTerm);
+ }, [searchTerm]);
- render() {
- const { searchValue } = this.state;
- return (
-
-
-
-
-
+
+
-
- );
- }
-}
+
+
+
+ );
+};
Searchbar.propTypes = {
searchTerm: PropTypes.string.isRequired,
From cca74b4d0e43f01f6f66df36b967b27980205286 Mon Sep 17 00:00:00 2001
From: Sheikh-JamirAlam
Date: Wed, 20 Sep 2023 20:10:08 +0530
Subject: [PATCH 002/151] Changed shortcut format for better accessibility
---
client/modules/IDE/components/Header/Nav.jsx | 6 ++----
.../modules/IDE/components/KeyboardShortcutModal.jsx | 12 ++++++------
client/utils/metaKey.js | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/client/modules/IDE/components/Header/Nav.jsx b/client/modules/IDE/components/Header/Nav.jsx
index b4f7cb151f..d956e81da2 100644
--- a/client/modules/IDE/components/Header/Nav.jsx
+++ b/client/modules/IDE/components/Header/Nav.jsx
@@ -195,9 +195,7 @@ const ProjectMenu = () => {
{t('Nav.Edit.TidyCode')}
-
- {metaKeyName}+{'\u21E7'}+F
-
+ {metaKeyName}+Shift+F
{t('Nav.Edit.Find')}
@@ -222,7 +220,7 @@ const ProjectMenu = () => {
dispatch(stopSketch())}>
{t('Nav.Sketch.Stop')}
- {'\u21E7'}+{metaKeyName}+Enter
+ Shift+{metaKeyName}+Enter
diff --git a/client/modules/IDE/components/KeyboardShortcutModal.jsx b/client/modules/IDE/components/KeyboardShortcutModal.jsx
index 093630498a..a56710810d 100644
--- a/client/modules/IDE/components/KeyboardShortcutModal.jsx
+++ b/client/modules/IDE/components/KeyboardShortcutModal.jsx
@@ -25,7 +25,7 @@ function KeyboardShortcutModal() {
-
- {metaKeyName} + {'\u21E7'} + F
+ {metaKeyName} + Shift + F
{t('KeyboardShortcuts.CodeEditing.Tidy')}
@@ -39,7 +39,7 @@ function KeyboardShortcutModal() {
-
- {metaKeyName} + {'\u21E7'} + G
+ {metaKeyName} + Shift + G
{t('KeyboardShortcuts.CodeEditing.FindPreviousTextMatch')}
@@ -84,24 +84,24 @@ function KeyboardShortcutModal() {
-
- {metaKeyName} + {'\u21E7'} + Enter
+ {metaKeyName} + Shift + Enter
{t('KeyboardShortcuts.General.StopSketch')}
-
- {metaKeyName} + {'\u21E7'} + 1
+ {metaKeyName} + Shift + 1
{t('KeyboardShortcuts.General.TurnOnAccessibleOutput')}
-
- {metaKeyName} + {'\u21E7'} + 2
+ {metaKeyName} + Shift + 2
{t('KeyboardShortcuts.General.TurnOffAccessibleOutput')}
-
- {'\u21E7'} + Right
+ Shift + Right
Go to Reference for Selected Item in Hinter
diff --git a/client/utils/metaKey.js b/client/utils/metaKey.js
index 6d9aab8a6c..cca6d3986b 100644
--- a/client/utils/metaKey.js
+++ b/client/utils/metaKey.js
@@ -6,6 +6,6 @@ const metaKey = (() => {
return 'Ctrl';
})();
-const metaKeyName = metaKey === 'Cmd' ? '⌘' : '⌃';
+const metaKeyName = metaKey === 'Cmd' ? '⌘' : 'Ctrl';
export { metaKey, metaKeyName };
From 3eb7c2ee9e8e34c7928f57fb4208a05b02f2ac1a Mon Sep 17 00:00:00 2001
From: Perminder Singh
Date: Fri, 22 Sep 2023 05:23:20 +0530
Subject: [PATCH 003/151] Added eye icon
---
client/modules/User/components/LoginForm.jsx | 54 ++++++---
client/modules/User/components/SignupForm.jsx | 109 ++++++++++++------
package-lock.json | 15 +++
package.json | 1 +
4 files changed, 129 insertions(+), 50 deletions(-)
diff --git a/client/modules/User/components/LoginForm.jsx b/client/modules/User/components/LoginForm.jsx
index d990299322..2d8e756db9 100644
--- a/client/modules/User/components/LoginForm.jsx
+++ b/client/modules/User/components/LoginForm.jsx
@@ -1,7 +1,8 @@
-import React from 'react';
+import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Form, Field } from 'react-final-form';
import { useDispatch } from 'react-redux';
+import { AiOutlineEye, AiOutlineEyeInvisible } from 'react-icons/ai';
import Button from '../../../common/Button';
import { validateLogin } from '../../../utils/reduxFormUtils';
import { validateAndLoginUser } from '../actions';
@@ -13,6 +14,10 @@ function LoginForm() {
function onSubmit(formProps) {
return dispatch(validateAndLoginUser(formProps));
}
+ const [showPassword, setShowPassword] = useState(false);
+ const handleVisibility = () => {
+ setShowPassword(!showPassword);
+ };
return (
diff --git a/client/modules/IDE/components/NewFolderForm.jsx b/client/modules/IDE/components/NewFolderForm.jsx
index bc305b8b18..b0935397ff 100644
--- a/client/modules/IDE/components/NewFolderForm.jsx
+++ b/client/modules/IDE/components/NewFolderForm.jsx
@@ -52,11 +52,15 @@ function NewFolderForm() {
)}
-
+
+ {() => (
+
+ )}
+
- {touched.name && errors.name && (
+ {touched.submitButton && errors.name && (
{errors.name}
)}
From 0cf768f2ef5b9fd34f6e6868b1332384020f6305 Mon Sep 17 00:00:00 2001
From: adityagarg06
Date: Fri, 26 Jan 2024 12:28:04 +0530
Subject: [PATCH 026/151] Implement Asset Modules in Webpack
---
webpack/config.dev.js | 17 +++++++----------
webpack/config.prod.js | 19 ++++++++-----------
2 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/webpack/config.dev.js b/webpack/config.dev.js
index feec0d1382..8606ba053c 100644
--- a/webpack/config.dev.js
+++ b/webpack/config.dev.js
@@ -79,32 +79,29 @@ module.exports = {
},
{
test: /\.(mp3)$/,
- use: 'file-loader'
+ type: 'asset/resource'
},
{
test: /\.(png)$/,
- use: {
- loader: 'file-loader',
- options: {
- name: '[name].[ext]',
- outputPath: 'images/'
- }
+ type: 'asset/resource',
+ generator: {
+ filename: 'images/[name][ext]'
}
},
{
test: /fonts\/.*\.(eot|ttf|woff|woff2)$/,
- use: 'file-loader'
+ type: 'asset/resource'
},
{
test: /\.svg$/,
oneOf: [
{
resourceQuery: /byContent/,
- use: 'raw-loader'
+ type: 'asset/source',
},
{
resourceQuery: /byUrl/,
- use: 'file-loader'
+ type: 'asset/resource',
},
{
use: {
diff --git a/webpack/config.prod.js b/webpack/config.prod.js
index 23811ed511..abceed6fa4 100644
--- a/webpack/config.prod.js
+++ b/webpack/config.prod.js
@@ -98,32 +98,29 @@ module.exports = {
},
{
test: /\.(png)$/,
- use: {
- loader: 'file-loader',
- options: {
- name: '[name].[ext]',
- outputPath: 'images/'
- }
- }
+ type: 'asset/resource',
+ generator: {
+ filename: 'images/[name][ext]'
+ }
},
{
test: /\.mp3$/,
- use: 'file-loader'
+ type: 'asset/resource',
},
{
test: /fonts\/.*\.(eot|ttf|woff|woff2)$/,
- use: 'file-loader'
+ type: 'asset/resource',
},
{
test: /\.svg$/,
oneOf: [
{
resourceQuery: /byContent/,
- use: 'raw-loader'
+ type: 'asset/source',
},
{
resourceQuery: /byUrl/,
- use: 'file-loader'
+ type: 'asset/resource',
},
{
use: {
From e94210195f6d1cefa322c2255a1d9af30f4c8cd4 Mon Sep 17 00:00:00 2001
From: Aditya Garg <104292766+adityagarg06@users.noreply.github.com>
Date: Fri, 26 Jan 2024 23:52:22 +0530
Subject: [PATCH 027/151] Update config.prod.js
---
webpack/config.prod.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webpack/config.prod.js b/webpack/config.prod.js
index abceed6fa4..7e7725e343 100644
--- a/webpack/config.prod.js
+++ b/webpack/config.prod.js
@@ -100,7 +100,7 @@ module.exports = {
test: /\.(png)$/,
type: 'asset/resource',
generator: {
- filename: 'images/[name][ext]'
+ filename: 'images/[name].[ext]'
}
},
{
From f106d951e50ce3e60e7706fc844b15f6987c2ab1 Mon Sep 17 00:00:00 2001
From: Aditya Garg <104292766+adityagarg06@users.noreply.github.com>
Date: Fri, 26 Jan 2024 23:52:48 +0530
Subject: [PATCH 028/151] Update config.dev.js
---
webpack/config.dev.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/webpack/config.dev.js b/webpack/config.dev.js
index 8606ba053c..cc405d0a00 100644
--- a/webpack/config.dev.js
+++ b/webpack/config.dev.js
@@ -85,7 +85,7 @@ module.exports = {
test: /\.(png)$/,
type: 'asset/resource',
generator: {
- filename: 'images/[name][ext]'
+ filename: 'images/[name].[ext]'
}
},
{
From 747d85c6145f8870a13f556b419c101fcc9bc630 Mon Sep 17 00:00:00 2001
From: Keshav
Date: Sun, 28 Jan 2024 21:56:55 +0530
Subject: [PATCH 029/151] Added Toast for EmptyCurrentPass &
IncorrectCurrentPass
---
client/modules/User/actions.js | 16 +++++++++++++---
translations/locales/en-US/translations.json | 4 +++-
translations/locales/hi/translations.json | 4 +++-
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/client/modules/User/actions.js b/client/modules/User/actions.js
index 8e05a681f3..88fab8e49f 100644
--- a/client/modules/User/actions.js
+++ b/client/modules/User/actions.js
@@ -275,7 +275,14 @@ export function submitSettings(formValues) {
export function updateSettings(formValues) {
return (dispatch) =>
- new Promise((resolve) =>
+ new Promise((resolve) => {
+ if (!formValues.currentPassword && formValues.newPassword) {
+ dispatch(showToast(5500));
+ dispatch(setToastText('Toast.EmptyCurrentPass'));
+ resolve();
+ return;
+ }
+
submitSettings(formValues)
.then((response) => {
dispatch(updateSettingsSuccess(response.data));
@@ -283,8 +290,11 @@ export function updateSettings(formValues) {
dispatch(setToastText('Toast.SettingsSaved'));
resolve();
})
- .catch((error) => resolve({ error }))
- );
+ .catch((error) => {
+ dispatch(showToast(5500));
+ dispatch(setToastText('Toast.IncorrectCurrentPass'));
+ });
+ });
}
export function createApiKeySuccess(user) {
diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json
index 39f3a426ef..f1ebd5b083 100644
--- a/translations/locales/en-US/translations.json
+++ b/translations/locales/en-US/translations.json
@@ -112,7 +112,9 @@
"SketchFailedSave": "Failed to save sketch.",
"AutosaveEnabled": "Autosave enabled.",
"LangChange": "Language changed",
- "SettingsSaved": "Settings saved."
+ "SettingsSaved": "Settings saved.",
+ "EmptyCurrentPass": "Current Password field is empty",
+ "IncorrectCurrentPass": "Current Password is incorrect"
},
"Toolbar": {
"Preview": "Preview",
diff --git a/translations/locales/hi/translations.json b/translations/locales/hi/translations.json
index 4226725a98..eb76c2ea84 100644
--- a/translations/locales/hi/translations.json
+++ b/translations/locales/hi/translations.json
@@ -112,7 +112,9 @@
"SketchFailedSave": "स्केच सेव करने में असमर्थ",
"AutosaveEnabled": "ऑटोसेव चालू",
"LangChange": "भाषा बदली",
- "SettingsSaved": "सेटिंग्स सेव की"
+ "SettingsSaved": "सेटिंग्स सेव की",
+ "EmptyCurrentPass": "वर्तमान पासवर्ड फ़ील्ड खाली है",
+ "IncorrectCurrentPass": "वर्तमान पासवर्ड गलत है "
},
"Toolbar": {
"Preview": "पूर्वावलोकन",
From 93b0a176c1d7e598117b6f90d6f6c66db0b97502 Mon Sep 17 00:00:00 2001
From: Rishi
Date: Mon, 29 Jan 2024 00:18:50 +0530
Subject: [PATCH 030/151] Fix : [#2973] Edited CSS to resolve the issue.
---
client/modules/User/components/CollectionCreate.jsx | 2 +-
client/styles/components/_forms.scss | 1 +
client/styles/components/_overlay.scss | 3 +--
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/modules/User/components/CollectionCreate.jsx b/client/modules/User/components/CollectionCreate.jsx
index 9a19f4abf1..02d3fb59f0 100644
--- a/client/modules/User/components/CollectionCreate.jsx
+++ b/client/modules/User/components/CollectionCreate.jsx
@@ -71,7 +71,7 @@ const CollectionCreate = () => {
value={description}
onChange={(e) => setDescription(e.target.value)}
placeholder={t('CollectionCreate.DescriptionPlaceholder')}
- rows="4"
+ rows="6"
/>