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

Fourth incremental upgrade to SPFx v1.16.1 #1424

Merged

Conversation

NishkalankBezawada
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
New sample? no
Related issues? fixes #1406

What's in this Pull Request?

Tried to upgrade the SPFx v1.7.0 to SPFx v1.20.0, but this project seems to have dependencies which will not work with react v17. I would like to give a try to upgrade to spfx v1.11.0 since, later versions of spfx has a significant breaking changes too. This might take some time, but I suggest to upgrade to spfx v1.11.0 and then try to do an incremental upgrade.

So this PR contains first incremental SPFx upgrade to SPFx v1.111.0

Thanks,
Nishkalank

@NishkalankBezawada NishkalankBezawada changed the title First incremental upgrade to SPFx v1.11.0 First incremental upgrade to SPFx v1.13.0 Oct 10, 2024
@NishkalankBezawada NishkalankBezawada changed the title First incremental upgrade to SPFx v1.13.0 Second incremental upgrade to SPFx v1.13.0 Oct 10, 2024
@NishkalankBezawada NishkalankBezawada changed the title Second incremental upgrade to SPFx v1.13.0 Third incremental upgrade to SPFx v1.15.0 Oct 10, 2024
@Adam-it Adam-it self-assigned this Oct 11, 2024
@NishkalankBezawada NishkalankBezawada changed the title Third incremental upgrade to SPFx v1.15.0 Fourth incremental upgrade to SPFx v1.16.1 Oct 13, 2024
@NishkalankBezawada NishkalankBezawada marked this pull request as draft October 18, 2024 10:02
@NishkalankBezawada
Copy link
Contributor Author

Hi @Adam-it

This project uses react-html-parser@2.0.2 which has a peer dependency on react@16.14.0 for which I am unable to upgrade to v1.20.0.

image

So far, I have upgraded it until SPFx v1.16.1

Thanks,
Nish

@NishkalankBezawada NishkalankBezawada marked this pull request as ready for review October 18, 2024 14:32
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.

@NishkalankBezawada I had a quick glance at the PR.
I am wondering if it is ok we are commenting out so much code and changing the behavior of the sample 🤔?
Could we have a double check on some of the comments I left? 🙏

samples/react-command-print/.nvmrc Outdated Show resolved Hide resolved
samples/react-command-print/spfx-upgrade-report-v1.11.md Outdated Show resolved Hide resolved
samples/react-command-print/spfx-upgrade-report-v1.13.0.md Outdated Show resolved Hide resolved
samples/react-command-print/spfx-upgrade-report-v1.15.0.md Outdated Show resolved Hide resolved
samples/react-command-print/spfx-upgrade-report-v1.16.1.md Outdated Show resolved Hide resolved
Comment on lines 66 to 68
//this.getTemplates();
// Get select item values
this.getItemContent();
//this.getItemContent();
Copy link
Contributor

Choose a reason for hiding this comment

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

is it actually ok we are commenting this out? won't we like change the behavior of the sample?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I enhanced it by using, since the original sample version was giving showing spinner continously, so i had to adjust the states too

await Promise.all([this.getTemplates(), this.getItemContent()]);

Instead calling the methods as below,

    public componentDidMount() {

        // Validate and create Print Settings list --> added list definition to elements.xml for adding Print List Settings
        // this.initializeSettings();
        // Get templates
        this.getTemplates();
        // Get select item values
        this.getItemContent();
    }

Copy link
Contributor

Choose a reason for hiding this comment

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

ok then we should remove this commented out code. If we improved it and confirmed that it works and it's better I see little sense in leaving commented out code in sample. Fro someone new to the sample it will just create more confusion and question why those comments are here and why there is alternative code but commented out

@Adam-it Adam-it marked this pull request as draft October 30, 2024 14:45
@NishkalankBezawada
Copy link
Contributor Author

Hey @Adam-it

here you go, with the comments and resolutions. I send you back this PR for review :)

I have checked it again by serving the extension, it works good.

Untitled+video+(13) (1)

Thanks,
Nish

@NishkalankBezawada NishkalankBezawada marked this pull request as ready for review October 30, 2024 18:26
Comment on lines 66 to 68
//this.getTemplates();
// Get select item values
this.getItemContent();
//this.getItemContent();
Copy link
Contributor

Choose a reason for hiding this comment

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

ok then we should remove this commented out code. If we improved it and confirmed that it works and it's better I see little sense in leaving commented out code in sample. Fro someone new to the sample it will just create more confusion and question why those comments are here and why there is alternative code but commented out

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.

@NishkalankBezawada Awesome work 👏👏👏👏
I managed to build and tested it.
I have only some small comments I will fixup myself before merging.
You Rock 🤩

samples/react-command-print/README.md Outdated Show resolved Hide resolved
@Adam-it Adam-it merged commit ba8e13f into pnp:main Nov 7, 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