Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Add inverted group mask #608

Merged
merged 3 commits into from
Jun 9, 2020
Merged

Add inverted group mask #608

merged 3 commits into from
Jun 9, 2020

Conversation

stevenvergenz
Copy link
Contributor

Add the concept of a GroupMask containing everything but the specified groups.

@stevenvergenz stevenvergenz requested a review from tombuMS June 8, 2020 21:48
@@ -73,13 +78,31 @@ export default class UserMaskTest extends Test {
}
});

const notRedIcon = MRE.Actor.Create(this.app.context, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint is complaining:

C:\code\Microsoft\mixed-reality-extension-sdk\packages\functional-tests\src\tests\user-mask-test.ts
   81:9  warning  'notRedIcon' is assigned a value but never used   @typescript-eslint/no-unused-vars
  115:9  warning  'notBlueIcon' is assigned a value but never used  @typescript-eslint/no-unused-vars

Copy link
Contributor

@eanders-ms eanders-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from lint complaints in the functional test, this looks good.

name: 'notRedIcon',
parentId: root.id,
appearance: {
enabled: new MRE.InvertedGroupMask(this.app.context, ['red', 'default']),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InvertedGroupMask [](start = 22, length = 17)

Does this mean not in the default group as well? Or is every user alway in the default group?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in the default group, correct.

Copy link
Contributor Author

@stevenvergenz stevenvergenz Jun 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: every user who has no other groups assigned is in the "default" group. So if "default" is in an inverted group mask, then those users will not see the given object.


In reply to: 437673473 [](ancestors = 437673473)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So then it is possible to use the default group for filtering now as well since you can set and object for the "not default group"?


In reply to: 437683618 [](ancestors = 437683618,437673473)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could always use the default group for filtering. Remember, the default group is not all users, it's only users with no other groups assigned. Just now you can apply inverted semantics. It's just like any other group.


In reply to: 437688309 [](ancestors = 437688309,437683618,437673473)

@stevenvergenz stevenvergenz merged commit b32e945 into red Jun 9, 2020
@stevenvergenz stevenvergenz deleted the stvergen/inverted-group-mask branch June 9, 2020 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants