From d51b48be134ffef217395fefc1fb5fad5f47d8bf Mon Sep 17 00:00:00 2001 From: Vishawdeep Singh Date: Mon, 6 Jan 2025 11:40:17 +0530 Subject: [PATCH] remove room's name chars limit --- src/app/organisms/create-room/CreateRoom.jsx | 30 ++++--------------- src/app/organisms/create-room/CreateRoom.scss | 13 +------- 2 files changed, 7 insertions(+), 36 deletions(-) diff --git a/src/app/organisms/create-room/CreateRoom.jsx b/src/app/organisms/create-room/CreateRoom.jsx index 494c67aa82..04b2faebe7 100644 --- a/src/app/organisms/create-room/CreateRoom.jsx +++ b/src/app/organisms/create-room/CreateRoom.jsx @@ -43,7 +43,7 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) { const [isValidAddress, setIsValidAddress] = useState(null); const [addressValue, setAddressValue] = useState(undefined); const [roleIndex, setRoleIndex] = useState(0); - const [nameError, setNameError] = useState(null); + const addressRef = useRef(null); const mx = useMatrixClient(); @@ -121,15 +121,6 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) { }, 1000); }; - const validateRoomName =(value) =>{ - if(value.length > 50){ - setNameError('Room name should be less than 50 characters'); - return false; - } - setNameError(null); - return true; - } - const joinRules = ['invite', 'restricted', 'public']; const joinRuleShortText = ['Private', 'Restricted', 'Public']; const joinRuleText = [ @@ -228,26 +219,17 @@ function CreateRoomContent({ isSpace, parentId, onRequestClose }) { } /> -
-
- validateRoomName(e.target.value)} maxLength={50} /> - -
- {nameError !== null && ( - - {nameError} - - )} -
+ {isCreatingRoom && (
diff --git a/src/app/organisms/create-room/CreateRoom.scss b/src/app/organisms/create-room/CreateRoom.scss index 1af8e3a1fa..0b80dd609d 100644 --- a/src/app/organisms/create-room/CreateRoom.scss +++ b/src/app/organisms/create-room/CreateRoom.scss @@ -64,7 +64,7 @@ &__name-wrapper { display: flex; - flex-direction: column; + align-items: flex-end; & .input-container { flex: 1; @@ -73,19 +73,8 @@ } & .btn-primary { padding-top: 11px; - align-self: last baseline; padding-bottom: 11px; } - &__tip { - margin-top: var(--sp-ultra-tight); - @include dir.side(margin, 26px, 0); - } - } - - &__name-error-wrapper { - display: flex; - align-items: center; - width: 100%; } &__loading {