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

38334 Only load required scripts and CSS #610

Merged
merged 14 commits into from
Oct 19, 2023

Conversation

dai-eastgate
Copy link
Contributor

@dai-eastgate dai-eastgate commented Aug 14, 2023

related to #554

changed log :
Update load the js file in the right place

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

Pull Request Test Coverage Report for Build 6482798248

  • 45 of 54 (83.33%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 79.23%

Changes Missing Coverage Covered Lines Changed/Added Lines %
plugin/Form.php 14 23 60.87%
Totals Coverage Status
Change from base Build 6479684394: -0.05%
Covered Lines: 7595
Relevant Lines: 9586

💛 - Coveralls

@fredericalpers fredericalpers added this to the v4.15 milestone Aug 15, 2023
@fredericalpers fredericalpers linked an issue Aug 15, 2023 that may be closed by this pull request
@fredericalpers fredericalpers added the QA Issue or Pull request that is in review label Aug 22, 2023
@yeneastgate yeneastgate requested a review from andernath August 24, 2023 03:17
@andernath
Copy link
Contributor

@yeneastgate or @dai-eastgate could you merge master into this bracne. I think it will show some merge conflicts.

@dai-eastgate
Copy link
Contributor Author

@yeneastgate or @dai-eastgate could you merge master into this bracne. I think it will show some merge conflicts.

I will merge master into this branch.

andernath
andernath previously approved these changes Oct 11, 2023
Copy link
Contributor

@andernath andernath left a comment

Choose a reason for hiding this comment

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

I will start testing.

@github-actions
Copy link

Steps to install the approved version:

  1. Download onoffice-4.14-18-gc61278ec-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/6480050217.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

@andernath
Copy link
Contributor

While testing I get a TypeError: $ is not a function. I don't know why this happens on my W3PM test enviorement. Because Jquery works well on another onOffice-Demo enviorement.

Error on Estatelist with multi select fields in search:
https://w3pm.onofficeweb.com/

No Error on Estatelist with multi select fields in search:
https://wp-plugin-demo.onoffice.com/en/estates/estate-list/

I double check right pluginversion -> both Version 4.14-18-gc61278ec) ✔
I checked settings in Estatelists -> nearly similar (default template...)

Maybe you habe an idea? @dai-eastgate @yeneastgate ?

@dai-eastgate
Copy link
Contributor Author

While testing I get a TypeError: $ is not a function. I don't know why this happens on my W3PM test enviorement. Because Jquery works well on another onOffice-Demo enviorement.

Error on Estatelist with multi select fields in search: https://w3pm.onofficeweb.com/

No Error on Estatelist with multi select fields in search: https://wp-plugin-demo.onoffice.com/en/estates/estate-list/

I double check right pluginversion -> both Version 4.14-18-gc61278ec) ✔ I checked settings in Estatelists -> nearly similar (default template...)

Maybe you habe an idea? @dai-eastgate @yeneastgate ?

@andernath I will check it. Thanks!

andernath
andernath previously approved these changes Oct 12, 2023
Copy link
Contributor

@andernath andernath left a comment

Choose a reason for hiding this comment

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

Repeat testing.

@github-actions
Copy link

Steps to install the approved version:

  1. Download onoffice-4.14-19-g11f0e5e1-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/6492223241.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

@andernath
Copy link
Contributor

@dai-eastgate
Maybe you forget to implement loading leaflet, only if maps are in use, See your comment here #574 (comment)

@dai-eastgate
Copy link
Contributor Author

@dai-eastgate Maybe you forget to implement loading leaflet, only if maps are in use, See your comment here #574 (comment)

I will check it. Thanks!

@andernath
Copy link
Contributor

@dai-eastgate Maybe you forget to implement loading leaflet, only if maps are in use, See your comment here #574 (comment)

I will check it. Thanks!

@dai-eastgate will you implement leaflet loading or is it part of another issue?

@dai-eastgate
Copy link
Contributor Author

dai-eastgate commented Oct 17, 2023

@dai-eastgate will you implement leaflet loading or is it part of another issue?

@andernath I'm implementing "leaflet loading". I will respond to you by the end of today. Because this feature works a bit differently, I had to check it more carefully

@andernath
Copy link
Contributor

@dai-eastgate will you implement leaflet loading or is it part of another issue?

@andernath I'm implementing "leaflet loading". I will respond to you by the end of today. Because this feature works a bit differently, I had to check it more carefully

Good Job! Thank you :)

@dai-eastgate
Copy link
Contributor Author

dai-eastgate commented Oct 17, 2023

@andernath @fredericalpers I have found a solution that loads the "leaflet" library only when needed and puts it in branch "38334-only-load-required-scripts-and-css-v2".

leaflet.mp4

However, this solution will affect backward compatibility.
Because I need to edit the logic code in the "map-osm.php" template file.
=> Do you agree to implement this solution?

In my personal opinion, I suggest keeping the "leaflet" library loaded in the tag and loading it every time like the current master branch.

@andernath
Copy link
Contributor

@andernath @fredericalpers I have found a solution that loads the "leaflet" library only when needed and puts it in branch "38334-only-load-required-scripts-and-css-v2".

leaflet.mp4
However, this solution will affect backward compatibility. Because I need to edit the logic code in the "map-osm.php" template file. => Do you agree to implement this solution?

In my personal opinion, I suggest keeping the "leaflet" library loaded in the tag and loading it every time like the current master branch.

@dai-eastgate I see your struggle :/
And I agree with you.
Lets discard the changes in "38334-only-load-required-scripts-and-css-v2" and keep loading leaflet always.

Can I continue testing here in #610 or did I miss any changes on "38334-only-load-required-scripts-and-css-v2" wich needed to be merged in here?
For example jquery dependency here: 70543e7

@dai-eastgate
Copy link
Contributor Author

And I agree with you.
Lets discard the changes in "38334-only-load-required-scripts-and-css-v2" and keep loading leaflet always.

@andernath OK, thanks. I will keep loading leaflet always

@dai-eastgate
Copy link
Contributor Author

Can I continue testing here in #610 or did I miss any changes on "38334-only-load-required-scripts-and-css-v2" wich needed to be merged in here?

@andernath I updated the code in #610. Please review it again. Thanks

Copy link
Contributor

@andernath andernath left a comment

Choose a reason for hiding this comment

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

Start Testing

@github-actions
Copy link

Steps to install the approved version:

  1. Download onoffice-4.14-20-g7204ef31-please-unpack.zip from https://github.com/onOffice-Web-Org/oo-wp-plugin/actions/runs/6570292134.
  2. Unpack the downloaded file to get another .zip file.
  3. Upload that inner .zip file to WordPress.

@andernath andernath merged commit fe87735 into master Oct 19, 2023
3 checks passed
@andernath andernath deleted the 38334-only-load-required-scripts-and-css branch October 19, 2023 08:05
@dai-eastgate dai-eastgate mentioned this pull request Jan 30, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Issue or Pull request that is in review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only load required scripts and CSS
4 participants