Skip to content

Use monospace font for some settings in admin UI#3546

Merged
tdilauro merged 1 commit into
mainfrom
chore/monospace-fonts-for-some-settings
Jul 9, 2026
Merged

Use monospace font for some settings in admin UI#3546
tdilauro merged 1 commit into
mainfrom
chore/monospace-fonts-for-some-settings

Conversation

@tdilauro

@tdilauro tdilauro commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Enable monospace font rendering for form fields in the OIDC and SAML patron authentication configuration models that contain code-like content — regular expressions, filter expressions, JSON, and XML/PEM blobs.

Motivation and Context

Fields holding structured or code-like values (regex patterns, Python expressions, XML metadata, JSON objects, private keys) are easier to read and edit in a monospace font. This sets use_monospace_font=True on those fields in the admin UI so their content renders as expected.

How Has This Been Tested?

  • Manual testing in local dev environment to verify that fields display with correct font family.
  • No logic changes, so existing tests should continue to pass.

Checklist

  • N/A - I have updated the documentation accordingly.
  • N/A - All new and existing tests passed.

@tdilauro tdilauro requested a review from a team July 9, 2026 04:14
@claude

claude Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Claude finished @tdilauro's task in 1m 41s —— View job


Code Review

  • Read PR diff and changed files
  • Verify use_monospace_font is a valid, correctly-serialized flag
  • Check that flagged fields are all code-like
  • Check for missed / inconsistent fields

Summary

This is a clean, low-risk, purely additive change. Each of the 11 additions sets use_monospace_font=True on a form field whose value is genuinely code-like — regex patterns, Python filter expressions (TEXTAREA), JSON blobs (extra_data), and XML/PEM material (service_provider_xml_metadata, service_provider_private_key, non_federated_identity_provider_xml_metadata). The flag is a well-supported hint on FormMetadata (defaults to False, serialized in to_dict at src/palace/manager/integration/settings.py:187-188), and its behavior is already covered generically in tests/manager/integration/test_settings.py, so no new tests are warranted for what is effectively a per-field UI hint. I also checked for consistency: the only TEXTAREA field left without the flag is OIDC auth_link_description (model.py:411-423), which holds patron-facing prose ("Log in with your university credentials") rather than code — correctly excluded. All Pattern/JSON/code-bearing TEXTAREA fields in both models are covered. No issues found.

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds monospace rendering hints to code-like patron authentication settings.

  • OIDC regex, filter expression, and JSON fields now request monospace display.
  • SAML XML, PEM, regex, filter expression, and JSON fields now request monospace display.
  • Library-level filter expression fields now use the same display hint.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
src/palace/manager/integration/patron_auth/oidc/configuration/model.py Adds monospace form metadata to OIDC regex, filter expression, JSON, and library filter expression fields.
src/palace/manager/integration/patron_auth/saml/configuration/model.py Adds monospace form metadata to SAML XML, PEM, regex, filter expression, JSON, and library filter expression fields.

Reviews (1): Last reviewed commit: "Use monospace font for some settinngs in..." | Re-trigger Greptile

@jonathangreen jonathangreen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!

@tdilauro tdilauro merged commit 27b7f89 into main Jul 9, 2026
24 checks passed
@tdilauro tdilauro deleted the chore/monospace-fonts-for-some-settings branch July 9, 2026 18:35
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