Skip to content

Conversation

@qgerome
Copy link
Contributor

@qgerome qgerome commented May 15, 2025

A short, meaningful PR description. Explain the goal of the PR and the ideas behind it.

Changes

Please list / describe the changes in the codebase for the reviewer(s).

  • Change 1
  • Change 2

How/what to test

A few words about what needs to be tested, along with specific testing instructions if needed.

Screenshots / screencast

If relevant, please add some screenshots or a short video.

…e.(ts|tsx|jsx|js) as actual pages

This will allow us to colocate the graphql and all the business components required in the pages folder
@qgerome qgerome requested review from nazarfil and yolanfery May 15, 2025 08:04
@qgerome
Copy link
Contributor Author

qgerome commented May 15, 2025

@nazarfil @yolanfery Could I have your impressions on this change ?

Copy link
Contributor

@yolanfery yolanfery left a comment

Choose a reason for hiding this comment

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

I am under the impression that :

  • Overall this is an improvement (navigation in the project would be easier, and the definition of graphql would be consistent opening up for opportunities to simplify and optimize the queries by using existing queries as examples)
  • Seems like a tedious manual process and I am not sure if it is worth the effort/risk (of regressions)

@@ -25,7 +26,14 @@ interface LoginForm {

const LoginPage: NextPageWithLayout = () => {
const router = useRouter();
const [doLogin] = useLoginMutation();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this particular change an improvement ? I am not sure about the direction of using inline qgl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's exactly why I wanted to have the opinion of the team. I started to move the graphQL operation inside a login.graphql and importing it in this file but I wanted to propose you both.

Comment on lines 10 to 17
const QUERY = gql`
query notebooksPage {
notebooksUrl
}
`;

const NotebooksPage = () => {
const { data } = useNotebooksPageQuery();
const { data } = useQuery<NotebooksPageQuery>(QUERY);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for this one : Is this particular change an improvement ? I am not sure about the direction of using inline qgl

import WebappIframe from "./WebappIframe";

describe("WebappIframe", () => {
it("⚠️ should not allow same origin iframe attribute for url of same origin", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

(Those tests should stay obviously)

@yolanfery
Copy link
Contributor

@nazarfil @yolanfery Could I have your impressions on this change ?

I am also under the impression that you also had a lot of fun for (seemingly) your last PR 😄

@qgerome
Copy link
Contributor Author

qgerome commented May 15, 2025

@nazarfil @yolanfery Could I have your impressions on this change ?

I am also under the impression that you also had a lot of fun for (seemingly) your last PR 😄

Renaming files and moving things is bringing so much joy :D

I am under the impression that :

  • Overall this is an improvement (navigation in the project would be easier, and the definition of graphql would be consistent opening up for opportunities to simplify and optimize the queries by using existing queries as examples)
  • Seems like a tedious manual process and I am not sure if it is worth the effort/risk (of regressions)

I feel that it's going to lower the cost of entry in the project.

@qgerome qgerome force-pushed the refactor-frontend-graphql branch from 6671ed8 to e1008e4 Compare May 15, 2025 15:17
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yolanfery is it better with a graphic file for the operations ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes definitely, thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed! 👍

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