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

WSTEAMA-901: Render /persian/afghanistan as a topic page on local & test environments #11221

Conversation

karinathomasbbc
Copy link
Contributor

@karinathomasbbc karinathomasbbc commented Dec 6, 2023

Resolves JIRA https://jira.dev.bbc.co.uk/browse/WSTEAMA-901

Overall changes

Renders /persian/afghanistan as a topic page

Code changes

  • Remove /persian/afghanistan from idx regex
  • Add /persian/afghanistan to the idx regex on live only
  • Update unit/automated tests

Testing

See ticket for testing information

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

@karinathomasbbc karinathomasbbc self-assigned this Dec 6, 2023
@karinathomasbbc karinathomasbbc marked this pull request as ready for review December 6, 2023 15:27
Copy link
Contributor

@amoore108 amoore108 left a comment

Choose a reason for hiding this comment

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

🤞

@pvaliani pvaliani self-requested a review December 8, 2023 09:11
const path = [topicPath];

if (!isLive()) {
path.push('/persian/afghanistan');
Copy link
Contributor

Choose a reason for hiding this comment

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

Will leave it optional but based on @amoore108's feedback yday we could also do something like

const path = [topicPath, !isLive() && '/persian/afghanistan'].filter(Boolean);

as an alternative if you find this more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for that @pvaliani. Given that we're going to have to change this again next week, when we put /persian/afghanistan live (and we'll remove all isLive() logic), are you happy for us to leave it as is for now? (But I'll be bookmarking this comment so that I remember how to do this another time 😸 )

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh aye, it's totally down to preference! Go for it

@karinathomasbbc karinathomasbbc merged commit 4eb9abd into latest Dec 8, 2023
@karinathomasbbc karinathomasbbc deleted the revert-11220-revert-11196-persian-afghanistan-topicpage branch December 8, 2023 10:42
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