Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit configs based on ConfigId property #88

Merged
merged 4 commits into from
Jan 8, 2024

Conversation

andrewheumann
Copy link
Member

@andrewheumann andrewheumann commented Jan 7, 2024

An upcoming pringle PR displays the name (rather than just the dimensions) of layout variants, so a user may select "8P" in a meeting room to get an 8P meeting room. This change revealed some issues:

  • because orientation was inconsistent, a different config than the one specified may get chosen.
  • because the rooms match the config dimensions exactly, we might actually wind up with the next size down.

This PR creates a pringle-specific pathway based on the existence of the Config Id property on a room, which is only set in Pringle. If this property is present:

  • We limit the possible configs to the single one matching the config ID
  • We force the orientation to use the first edge of the profile segment as its orientation edge

We also add a small amount of tolerance to the "fit" algorithm, so that an exact size match yields the correct type.

I have tested this on Pringle in an in-progress branch with the Meeting Room type. Other "named" configs for other types are less specific about precisely what you're going to see, so I didn't feel the need to update them, but when re-published they should do a better job of respecting the specified type name as well.


This change is Reviewable

Copy link
Contributor

@anthonie-kramer anthonie-kramer left a comment

Choose a reason for hiding this comment

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

Reviewed 14 of 14 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 change requests, 0 of 1 approvals obtained, 1 unresolved discussion (waiting on @andrewheumann)


LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs line 255 at r1 (raw file):

        {
            // If a set of wall candidate options are provided, limit to the one that aligns with the boundary's first edge.
            // In the future, as room shapes become more editable, we might want to pass in an explicit "orientation edge" instead of just using the first edge.

We could use the PrimaryEntryEdge as the orientation edge

Copy link
Contributor

@anthonie-kramer anthonie-kramer left a comment

Choose a reason for hiding this comment

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

One comment below about using the PrimaryEntryEdge on the RoomEdge class as the orientation edge

Reviewable status: :shipit: complete! 1 change requests, 0 of 1 approvals obtained, 1 unresolved discussion (waiting on @andrewheumann)

Copy link
Member Author

@andrewheumann andrewheumann left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 change requests, 0 of 1 approvals obtained, 1 unresolved discussion (waiting on @anthonie-kramer)


LayoutFunctions/LayoutFunctionCommon/LayoutStrategies.cs line 255 at r1 (raw file):

Previously, anthonie-kramer (Anthonie Kramer) wrote…

We could use the PrimaryEntryEdge as the orientation edge

I like this suggestion; we'd have to do a bunch of additional work in Pringle to have it create RoomEdge objects etc, so I'll leave as a TODO for now.

@andrewheumann andrewheumann merged commit 37e44c5 into use-folder-content-update Jan 8, 2024
1 check passed
@andrewheumann andrewheumann deleted the set-specific-meeting-rooms branch January 8, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants