Skip to content

[WHIT-2971] Add Topical Event to new document screen#11104

Open
MuriloDalRi wants to merge 2 commits intomainfrom
topical-event-new-document-page
Open

[WHIT-2971] Add Topical Event to new document screen#11104
MuriloDalRi wants to merge 2 commits intomainfrom
topical-event-new-document-page

Conversation

@MuriloDalRi
Copy link
Contributor

@MuriloDalRi MuriloDalRi commented Feb 9, 2026

Add “Topical Event” to the ‘New document’ screen to switch on the feature for our beta users.

🚨 Do not merge yet.

Jira

Copy link
Contributor

@TonyGDS TonyGDS left a comment

Choose a reason for hiding this comment

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

I noticed that the topical event option hasn't been removed from the Standard Document menu. I think that is what is required in the ticket?:

1. Remove reference to the flexible content feature flag in the dropdown

Copy link
Contributor

@lauraghiorghisor-tw lauraghiorghisor-tw left a comment

Choose a reason for hiding this comment

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

I'd make the changes in line with what you put in the PR description, i.e. actually turning the flag on for topical event. This should not be merged yet.

@MuriloDalRi MuriloDalRi force-pushed the topical-event-new-document-page branch from e07cb01 to f073dde Compare February 10, 2026 15:59
}
types["topical_event"] = {
"klass" => StandardEdition,
"hint_text" => "Use this to create topical events.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please follow the pattern I have already linked to elsewhere, the one in the choose_type, and surface the topical_event json description as the hint text here?

Copy link
Contributor

Choose a reason for hiding this comment

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

@lauraghiorghisor-tw
Copy link
Contributor

I noticed that the topical event option hasn't been removed from the Standard Document menu. I think that is what is required in the ticket?:

1. Remove reference to the flexible content feature flag in the dropdown

Just on this - if you mean this below @TonyGDS
Screenshot 2026-02-12 at 13 56 25

I think it will always show there, it's a Standard Edition. The already migrated types still show there too. Think it's fine.

It might mean removing the flag altogether, but we still have history page there so not yet. Tagging @ChrisBAshton to clarify 😅

@MuriloDalRi MuriloDalRi force-pushed the topical-event-new-document-page branch from f073dde to ad6ff21 Compare February 13, 2026 13:31
@MuriloDalRi MuriloDalRi force-pushed the topical-event-new-document-page branch from ad6ff21 to 78356ce Compare February 13, 2026 14:39
@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the topical-event-new-document-page branch 2 times, most recently from ed6617e to 9bc89b6 Compare February 18, 2026 08:04
types["topical_event"] = {
"klass" => StandardEdition,
"hint_text" => "Use this to create config-driven topical events.",
"hint_text" => ConfigurableDocumentType.find("topical_event").description,
Copy link
Contributor

Choose a reason for hiding this comment

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

As you can see in the last commit (and message) this line comes with a lot of changes in tests, though I would not say they are necessarily bad changes. We can alternatively just hard-code the thing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also use the config for the label?

Copy link
Contributor

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@ryanb-gds ryanb-gds left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -0,0 +1,7 @@
require_relative "mocha"

Before do
Copy link
Contributor

Choose a reason for hiding this comment

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

Moving this setup into a helper is a nice touch. Capital B in before seems a bit weird for Ruby, but anyway, if it works

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems to be a cucumber hook in this context, fails with a b.

types["topical_event"] = {
"klass" => StandardEdition,
"hint_text" => "Use this to create config-driven topical events.",
"hint_text" => ConfigurableDocumentType.find("topical_event").description,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also use the config for the label?

@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the topical-event-new-document-page branch from 9bc89b6 to 428ae0a Compare February 18, 2026 11:35
@lauraghiorghisor-tw lauraghiorghisor-tw dismissed stale reviews from TonyGDS and themself February 18, 2026 11:36

All concerns addressed.

@lauraghiorghisor-tw lauraghiorghisor-tw force-pushed the topical-event-new-document-page branch 2 times, most recently from 4249fbd to 1cb4748 Compare March 5, 2026 09:40
MuriloDalRi and others added 2 commits March 5, 2026 10:44
We want to show a bit of hint text under the document type, which should come from the schema description, in the same way it does for other "single" document (sub)types such as news stories. The label should also come from the schema title. Topical events do not have subtypes so there is no additional choose type screen.

Calling `ConfigurableDocumentType.find` with a "real" document type key put us in a position where we needed to either build a test type with that key or stub the call. I opted to do the latter, since we have generally kept our tests agnostic to any real type references.
@TonyGDS TonyGDS force-pushed the topical-event-new-document-page branch from 1cb4748 to 2bc571a Compare March 5, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants