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

react-command-convert-to-pdf - Updated #1435

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

NicolasKheirallah
Copy link
Contributor

By submitting this pull request, you agree to the contribution guidelines

If you aren't familiar with how to contribute to open-source repositories using GitHub, or if you find the instructions on this page confusing, sign up for one of our Sharing is Caring events. It's completely free, and we'll guide you through the process.

Q A
Bug fix? no
New feature? yes
New sample? no
Related issues? Updated to latest SPFX, Rewrote and cleaned up alot and moved from using third party to using Graph to both get request the file but also converting it!

What's in this Pull Request?

Please describe the changes in this PR. Sample description or details around bugs which are being fixed.
Upgrade SPFx to version 1.20.1, rewrite it from scratch using Graph API and using the built in converter in Graph, moved to Fluent UI and alot more

Copy link
Contributor

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

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

@NicolasKheirallah Awesome work so far 👏👏👏👏
I think we are on the right track but it seems w have a few tiny steps w need to sort out before we proceed. I left a few comments, please do give the a double check 🙏

Also we should update the assets/sample.json file. We should update the updateDateTime and SPFX-VERSION metadata

Also did you generate the upgrade guidance for this project and go over the required things?
I noticed some were still not done like including eslint or modifying the yo-rc.json
image

Copy link
Contributor

Choose a reason for hiding this comment

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

let's not include such a file in the sample. This seems to me more like a coding preference kinda approach rather than a file that refers to the sample itself.
Lets remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

we should also update in the Compatibility section the tags for SPFx to 1.20.0 and Node to v18.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we are still missing this update. When I look at the readme file we still did not udpate the SPFx version and node version tags
image

Comment on lines 12 to 13
build.addSuppression(/error semicolon: Unnecessary semicolon$/);
build.addSuppression(/error semicolon: Missing semicolon$/);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should not suppress errors in build toolchain. It would be best if we resolve those issues along the way.
If some warning is a pain we may just eslint file

Comment on lines 46 to 47
build.tslintCmd.enabled = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not a huge problem or a bug but seems to me a bit out of scope for the related issue. Our aim is to upgrade the project and fix it up if anything requires updates to make it work with SPFx 1.20.
Here we are adding an additional file for auto update of version number. I say lets avoid including additional side changes and make our update and PR simple and clean 👍

Copy link
Contributor Author

@NicolasKheirallah NicolasKheirallah Oct 22, 2024

Choose a reason for hiding this comment

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

Thanks for comments, feedback and guidance as well for take the time to go through it!
I've never used the SPFX upgrade CLI, Didn't know it existed!! That's gonna help quite a bit!

I'll fix it right away and make a new pull request for all the projects! :)

Copy link
Contributor

Choose a reason for hiding this comment

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

no problem. in the related issue I mentioned two tools that might support you in the upgrade.
You may use either CLI for Microsoft 365 using the m365 spfx project upgrade command
or You may install the SPFx Toolkit VS Code extension and there is an upgrade action as well

@Adam-it Adam-it marked this pull request as draft October 22, 2024 22:12
@Adam-it
Copy link
Contributor

Adam-it commented Oct 29, 2024

@NicolasKheirallah are you still working on this? If the PR is ready for review please click on the 'Ready for review' button to let us know

@NicolasKheirallah NicolasKheirallah marked this pull request as ready for review October 29, 2024 07:24
@NicolasKheirallah
Copy link
Contributor Author

@NicolasKheirallah are you still working on this? If the PR is ready for review please click on the 'Ready for review' button to let us know

I must been blind, didn't even see that button 🤣

Copy link
Contributor

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

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

@NicolasKheirallah I think we are almost there. I still noticed some things we missed or which is strange. Could you have a closer look?

Copy link
Contributor

Choose a reason for hiding this comment

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

We should update the SPFx version and Node version tags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! :) Thanks so much for the help!!

Copy link
Contributor

Choose a reason for hiding this comment

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

why change this file to tsx? I think it is not rendering anything right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had some rendering inside it when I refactored it and trying some stuff and I forgot to change it back 😅

@Adam-it Adam-it marked this pull request as draft October 29, 2024 07:47
@NicolasKheirallah NicolasKheirallah marked this pull request as ready for review October 29, 2024 09:31
Copy link
Contributor

@Adam-it Adam-it left a comment

Choose a reason for hiding this comment

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

@NicolasKheirallah all good 👏👏👏👏

@Adam-it Adam-it merged commit 490185b into pnp:main Oct 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants