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

SAML: port template #348

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

SAML: port template #348

wants to merge 6 commits into from

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented May 1, 2024

This is just a basic form to show information about the integration.

Screenshot 2024-05-01 at 12-28-39 org - SAML integration - Read the Docs

Screenshot 2024-05-01 at 12-28-27 neworg - SAML integration - Read the Docs

Ref https://github.com/readthedocs/readthedocs-corporate/pull/1770

@stsewd stsewd requested a review from a team as a code owner May 1, 2024 17:34
@stsewd stsewd requested a review from agjohnson May 1, 2024 17:34

<div class="ui padded segment">
<h4>
{% trans "SAML integration details" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

It feels like these sections are swapped. These feel like "settings" instead of details. The read only attributes above, labeled "settings" feel like they should be labeled "integration details".

Copy link
Member Author

Choose a reason for hiding this comment

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

They both are settings, ones are used to create the integration from the identify provider, and the others are the values we are using to connect to that integration, plus the domain we are linking to that integration. But, yeah, not really sure how to name each section.

Copy link
Contributor

Choose a reason for hiding this comment

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

The read only attributes that users use on their own SAML provider are not settings to our users, the user cannot set them. I would try to avoid ambiguity here and be more descriptive with what these values actually are or do for the user.

  • For the top section: "Details for your SAML provider" or "Configure your SAML provider"
  • For the form section where the user does enter settings, all other forms in admin views use "Add ..." and "Update ..." as titles -- so "Add SAML integration" and "Update SAML integration" based on whether or not the form is bound.

Copy link
Member Author

Choose a reason for hiding this comment

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

We aren't allowing updating the integration yet https://github.com/readthedocs/readthedocs-corporate/issues/1781.

Copy link
Contributor

Choose a reason for hiding this comment

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

I noted on that issue, we already allow full control of other auth mechanisms, so it seems worth keeping these consistent instead of special casing SAML auth. We should improve the UX around auth changes in the future more broadly, but SAML is not particularly unique here.

<div class="field">
<label>{% trans "Domain" %}</label>
<div class="ui fluid input">
<input type="text" value="{{ domain }}" readonly>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there not a form instance that we can use here instead of making the form manually?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, we fetch all the attributes from a single URL, we don't have a form for all attributes.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to do a bit more with the form here. This UI is making new patterns where I'd like to instead keep things consistent across all the views.

It's okay to show the read only values as a supplemental to a form instance, but the form should always be treated as a form at very least. That is, the two user editable fields (domain, metadata URL) should always be part of a form display through Crispy. Right now, after submitting, there doesn't seem to be a way to change or delete these fields.

With those fields displaying as a form, I would then display the readonly attributes separately, as to not confuse them with the user editable fields (domain and metadata URL).


<div class="ui padded segment">
<h4>
{% trans "SAML integration details" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

The read only attributes that users use on their own SAML provider are not settings to our users, the user cannot set them. I would try to avoid ambiguity here and be more descriptive with what these values actually are or do for the user.

  • For the top section: "Details for your SAML provider" or "Configure your SAML provider"
  • For the form section where the user does enter settings, all other forms in admin views use "Add ..." and "Update ..." as titles -- so "Add SAML integration" and "Update SAML integration" based on whether or not the form is bound.

<div class="field">
<label>{% trans "Domain" %}</label>
<div class="ui fluid input">
<input type="text" value="{{ domain }}" readonly>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to do a bit more with the form here. This UI is making new patterns where I'd like to instead keep things consistent across all the views.

It's okay to show the read only values as a supplemental to a form instance, but the form should always be treated as a form at very least. That is, the two user editable fields (domain, metadata URL) should always be part of a form display through Crispy. Right now, after submitting, there doesn't seem to be a way to change or delete these fields.

With those fields displaying as a form, I would then display the readonly attributes separately, as to not confuse them with the user editable fields (domain and metadata URL).

</div>
</div>

<div class="ui padded segment">
Copy link
Contributor

Choose a reason for hiding this comment

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

Other views do no use segments to wrap the forms, the segment here can be removed so the form shows with no border.

Copy link
Member Author

Choose a reason for hiding this comment

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

Getting this now

Screenshot 2024-05-22 at 17-02-52 org - SAML integration - Read the Docs

Already added the padded class to the div.

@stsewd
Copy link
Member Author

stsewd commented May 23, 2024

Still have the problem from #348 (comment).

Screenshot 2024-05-23 at 09-50-51 org - Authorization - Read the Docs
Screenshot 2024-05-23 at 09-50-44 two - Authorization - Read the Docs

@stsewd stsewd requested a review from agjohnson May 23, 2024 14:53
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.

None yet

2 participants