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

Fix/ppdsc 2113 prodtealium not being served #194

Merged
merged 31 commits into from
May 17, 2022

Conversation

Vanals
Copy link
Contributor

@Vanals Vanals commented May 9, 2022

PPDSC-2113

What

We were trying to access to productionSiteEnv through this.props. this.props.productionSiteEnv is undefined.

None of the props created at getStatiprops level were defined. The production prop, wasn't even used anywhere.
I have so cleaned the props, removing production and productionSiteEnv, then questioned the rest of the function. If renderPage is needed or if getStaticProps is needed at all.

I am then accessing the values, directly from process without passing them as a prop(which wasn't happening anyway). Time ago when we were using getInitialProps the props were working, but we moved away from it for fixing an issue with HeadNext.

Removing the whole function

I could not find in the documentation any guidance around renderPage(), that could fit us, I could not find any guidance around why we should use getStaticProps in the _document. Instead, getStaticProps, is stated, is not supported in _document AND when building the page, after removing all of it, the website seems working fine.

https://nextjs.org/docs/advanced-features/custom-document

Document currently does not support Next.js [Data Fetching methods](https://nextjs.org/docs/basic-features/data-fetching/overview) like [getStaticProps](https://nextjs.org/docs/basic-features/data-fetching/get-static-props) or [getServerSideProps](https://nextjs.org/docs/basic-features/data-fetching/get-server-side-props).

renderPage

I have done:

  • Written unit tests against changes
  • Written functional tests against the component and/or NewsKit site
  • Updated relevant documentation

I have tested manually:

  • The feature's functionality is working as expected on Chrome, Firefox, Safari and Edge
  • The screen reader reads and flows through the elements as expected.
  • There are no new errors in the browser console coming from this PR.
  • When visual test is not added, it renders correctly on different browsers and mobile viewports (Safari, Firefox, small mobile viewport, tablet)
  • The Playground feature is working as expected

Before:

After:

Who should review this PR:

How to test:

@Vanals Vanals added the WIP Work in progress label May 9, 2022
@github-actions github-actions bot added the fix This change fixes a bug label May 9, 2022
@Vanals Vanals added ready for review Please assist in getting this reviewed and removed WIP Work in progress labels May 11, 2022
@Vanals Vanals added WIP Work in progress ready for review Please assist in getting this reviewed and removed ready for review Please assist in getting this reviewed WIP Work in progress labels May 11, 2022
Copy link
Contributor

@mutebg mutebg left a comment

Choose a reason for hiding this comment

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

thanks for explanation, seems good to me

@Vanals Vanals merged commit afe6632 into main May 17, 2022
@Vanals Vanals deleted the fix/PPDSC-2113-prodtealium-not-being-served branch May 17, 2022 10:06
Xin00163 pushed a commit that referenced this pull request Oct 17, 2022
* docs(PPDSC-0000): testing permissions

* docs(PPDSC-0000): removing test changed from readme

* fix(PPDSC-2113): testing vars

* fix(PPDSC-2113): updated name

* fix(PPDSC-2113): trying to make test job work

* fix(PPDSC-2113): changing context to test

* fix(PPDSC-2113): remove comments hoping t works

* fix(PPDSC-2113): removed console.log

* fix(PPDSC-2113): removed echo

* fix(PPDSC-2113): testing

* fix(PPDSC-2113): consologging stuff

* fix(PPDSC-2113): debugging

* fix(PPDSC-2113): static to initial props

* fix(PPDSC-2113): nested props into props obj

* fix(PPDSC-2113): to getStaticProps

* fix(PPDSC-2113): console logging stuff

* fix(PPDSC-2113): tealium with props and clog

* fix(PPDSC-2113): removed static props -  get var from process

* fix(PPDSC-2113): cleaned _document file

* fix(PPDSC-2113): added new line

* fix(PPDSC-2113): added back pr env for job

* fix(PPDSC-2113): improved naming var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This change fixes a bug ready for review Please assist in getting this reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants