-
-
Notifications
You must be signed in to change notification settings - Fork 833
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Just a few nits mainly regarding the desings
@SimonBrandner I've resolved nits and added one more commit, also I;ve updated the video can you please look into it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great!
value: JoinRule.Knock, | ||
label: _t("Ask to join"), | ||
description: _t("Requires users to be granted access in order to join"), | ||
checked: joinRule === JoinRule.Knock && knockingEnabled === true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want to show this even if knockingEnabled === false
to avoid lying to the user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is to check whether knocking
option is enabled in the labs flag or not, if not enabled will it be right to show this option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, though even if it is disabled, the room's join rule could be JoinRule.Knock
- we should be smarter and show the user what the actual join rule is no matter what but we shouldn't allow the user to set the join rule to JoinRule.Knock
if knockingEnabled === false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's sort of expected that the labs flag will be moderately short-lived, so would be okay with it just being wrong when people don't have the labs flag enabled.
@@ -49,13 +50,20 @@ interface IProps { | |||
const JoinRuleSettings = ({ room, promptUpgrade, aliasWarning, onError, beforeChange, closeSettingsFn }: IProps) => { | |||
const cli = room.client; | |||
|
|||
const roomSupportsKnocking = doesRoomVersionSupport(room.getVersion(), PreferredRoomVersions.KnockingRooms); | |||
const preferredKnockingVersion = !roomSupportsKnocking && promptUpgrade |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah going to use it to check the room version supports knocking or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally this seems to be going in the correct direction!
For this PR, I think we'll just need the cypress tests and room version check mentioned elsewhere. Then we can get it landed and in front of users while we work on the rest of the features.
value: JoinRule.Knock, | ||
label: _t("Ask to join"), | ||
description: _t("Requires users to be granted access in order to join"), | ||
checked: joinRule === JoinRule.Knock && knockingEnabled === true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's sort of expected that the labs flag will be moderately short-lived, so would be okay with it just being wrong when people don't have the labs flag enabled.
e1ed252
to
23a0c0f
Compare
@turt2live I've made the recent push and I've also uploaded the video of the updated code which conditionally renders the room settings option according to labs flag, can you verify it? 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks to be in the right direction :)
please try to avoid force-pushing (rebasing) after review has already been given - it makes things a bit harder to review. We don't mind merge commits when updating the branch because we'll squash them all down to 1 when we merge the PR.
Agh! sorry for it I just do it in order avoid one extra merge commit everytime I update my branch 😅 I'll keep it in mind |
cy.get('[label="Name"]').type(name); | ||
cy.get('[label="Topic (optional)"]').type(topic); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we tend to use aria-label for selecting usually but it probably doesn't matter much
cy.get('[label="Topic (optional)"]').type(topic); | ||
cy.get(".mx_JoinRuleDropdown").click(); | ||
cy.get(".mx_JoinRuleDropdown_knock").click(); | ||
cy.startMeasuring("from-submit-to-room"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is the purpose of this? I am not sure if it makes sense to have a performance test specific to knocking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is the purpose of this? I am not sure if it makes sense to have a performance test specific to knocking?
I thought since we are using it in createRoom.spec.ts
it has some importance or something like that
|
||
// Change room settings | ||
cy.openRoomSettings("Security & Privacy"); | ||
cy.get(".mx_StyledRadioButton_content").contains("Ask to join").click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/me might be confused - are you setting the join rule to the same thing again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/me might be confused - are you setting the join rule to the same thing again?
Agh! thanks for it actually it was a bug in the JoinRuleSettings itself there wasn't an event message for join rule knock, I solved it now there shouldn't be a problem ;)
//Check if the room settings are visible if labs flag is disabled | ||
cy.openUserSettings("Labs").within(() => { | ||
//disables labs flag feature | ||
cy.get("[aria-label='Knocking']").click(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you could add disableLabsFeature
analogous to enableLabsFeature
, it would be absolutely awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you could add
disableLabsFeature
analogous toenableLabsFeature
, it would be absolutely awesome!
I tried it but Idk why it isn't working could you please verify my latest pull 😅
Signed-off-by: ankur12-1610 <[email protected]>
Signed-off-by: ankur12-1610 <[email protected]>
…eature Signed-off-by: ankur12-1610 <[email protected]>
Signed-off-by: ankur12-1610 <[email protected]>
Signed-off-by: ankur12-1610 <[email protected]>
This has been superseded by PRs from Nordeck |
Checklist
Demo for Creating Room:
Knocking-demo.mp4
Demo for Room Settings:
demo-room-settings.mp4
Related PR: vector-im/#22926
This PR currently has none of the required changelog labels.
A reviewer can add one of:
T-Deprecation
,T-Enhancement
,T-Defect
,T-Task
to indicate what type of change this is, or addType: [enhancement/defect/task]
to the description and I'll add them for you.