Skip to content

Improving Author selector#2583

Open
PothieuG wants to merge 7 commits intomainfrom
2152-Author_Selection_Improvement
Open

Improving Author selector#2583
PothieuG wants to merge 7 commits intomainfrom
2152-Author_Selection_Improvement

Conversation

@PothieuG
Copy link
Copy Markdown
Member

@PothieuG PothieuG commented Apr 13, 2026

Description

PBI - #2152

  • Dropdown creation with SSW authors
  • Switch mode for external author
  • Adam Cogan set by default

Screenshot (optional)

2026-04-13_14-35-20.mp4

@PothieuG PothieuG marked this pull request as draft April 13, 2026 09:50
@PothieuG
Copy link
Copy Markdown
Member Author

/deploy

@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Deployed

Preview URL https://app-sswrules-staging-pr-2583.azurewebsites.net/rules
Slot Name pr-2583
Branch 2152-Author_Selection_Improvement
Commit 2889428a7bf81a66b1fd24be5bd3a15e0c7da5c2

This preview will be automatically deleted when the PR is closed.

@PothieuG PothieuG marked this pull request as ready for review April 13, 2026 12:36
@PothieuG PothieuG enabled auto-merge (squash) April 13, 2026 12:36
@Aibono1225
Copy link
Copy Markdown
Member

We may need an image field for the author selection. Because otherwise non-ssw people cannot put their image photo

@Aibono1225
Copy link
Copy Markdown
Member

I went to https://app-sswrules-staging-pr-2583.azurewebsites.net/rules/admin#/~/rules/reply-done
and I saw the MDX is broken on staging:
image

Any idea why the workflow Check-MDX didn't work? 🤔

@Aibono1225
Copy link
Copy Markdown
Member

Let's add some validation for the field:

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the TinaCMS rule editing experience to make author selection easier by defaulting to Adam Cogan, supporting selection from the SSW employee list, and allowing non-SSW authors with optional custom profile images.

Changes:

  • Update the Rule “authors” schema to default to Adam Cogan and add an optional img field for non-SSW author profile images.
  • Add custom TinaCMS fields: an SSW-employee searchable author selector and a URL field that becomes read-only for SSW People links.
  • Extend Tina GraphQL queries to include the new authors.img field.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tina/tina-lock.json Updates Tina schema for authors (default Adam Cogan, adds img).
tina/queries/queries.gql Fetches authors.img in rule queries.
tina/fields/AuthorUrlField.tsx New custom URL field with read-only behavior for SSW People links.
tina/fields/AuthorSelector.tsx New searchable SSW employee dropdown + non-SSW manual entry mode.
tina/collection/rule.tsx Wires the new custom fields into the Rule collection and adds validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tina/fields/AuthorUrlField.tsx
Comment thread tina/fields/AuthorSelector.tsx
Comment thread tina/fields/AuthorSelector.tsx Outdated
Comment thread tina/fields/AuthorSelector.tsx Outdated
Comment thread tina/fields/AuthorSelector.tsx
Comment thread tina/collection/rule.tsx
PothieuG and others added 2 commits April 13, 2026 15:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@PothieuG
Copy link
Copy Markdown
Member Author

/deploy

1 similar comment
@PothieuG
Copy link
Copy Markdown
Member Author

/deploy

@PothieuG PothieuG changed the title Adding Adam as author by defautl + creating custom component for user… Improving Author selector Apr 13, 2026
@Aibono1225
Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits April 30, 2026 12:13
Co-authored-by: Aibono1225 <127192800+Aibono1225@users.noreply.github.com>
auto-merge was automatically disabled April 30, 2026 12:14

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 30, 2026

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 1924246. Took origin/main's tina-lock.json (TinaCMS 2.2.5) as the base and applied our schema changes (img field and Adam Cogan default) on top of it.

I went to https://app-sswrules-staging-pr-2583.azurewebsites.net/rules/admin#/~/rules/reply-done
and I saw the MDX is broken on staging:
<img width="2804" height="1528" alt="image" src="https://gith...

The MDX breaking on staging was caused by the tina-lock.json being out of sync — the img field was added to the schema but the lock file wasn't regenerated against the latest TinaCMS 2.2.5. This is now fixed by the merge commit 1924246 which properly combines both the TinaCMS 2.2.5 update from main and our schema changes.

Let's add some validation for the field:

image

...

URL validation for both the url and img fields is already in place — it uses new URL() to validate proper URL syntax and rejects values like foo.bar that don't have a valid protocol (e.g. http:// or https://). The validation was added as part of commit 2889428. Note that direct file edits (outside TinaCMS admin) bypass this client-side validation by design.

Copilot AI requested a review from Aibono1225 April 30, 2026 12:18
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.

4 participants