Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #42595 Back to Issue ]
Summary 0042595: StyleSheet components and StaticResource components do not follow the same criteria for development mode
Revision 2019-12-18 13:34 by marvintm
Steps To Reproduce The confusing behaviour we got was the following:
- We had an instance with a module which depended on the WebPOS set as in development. The rest of the modules were set as not in development.
- The StaticResourceComponent (correctly) considered that the instance was in development. The WebPOS was shown in development, the manifest was empty, and if the developer did a change in a js file, and refreshed the page, the JS file would be regenerated.
- However, the StyleSheetResourceComponent request, although it was triggered and reached the backend, returned 304 (not modified), because the eTag did not change.
- The reason for this is that the CSS was cached, and the eTag always returned the same checksum.

This was quite confusing because even though the system was in development, in order to test CSS changes you had to restart Tomcat everytime, which was quite annoying.
Revision 2019-12-18 13:33 by marvintm
Description Currently:

- Both StyleSheetResourceComponents and StaticResourceComponents are cached if the system is not in development.
- Both components are added to the manifest for ServiceWorkers functionality for mobile applications
- StyleSheetResource uses the cache information to generate the eTag in case the component is cached
- Manifest component uses the isindevelopment implementation of the StaticResourceComponent to know if it should be empty (in development), or should contain all resources (not in development).

The main issue is that the implementation of the "isInDevelopment" method in StyleSheetResourceComponent and the StaticResourceComponent are not the same, and can return different results depending on the configuration of the system, and this can lead to very confusing behaviour.

The problem is not very serious, as it doesn't affect production instances and only affects developers, but it can be quite annoying if you are developing CSS changes and the WebPOS is not set as in development, and other modules are set as in development.
Revision 2019-12-18 13:32 by marvintm
Description Currently:

- Both StyleSheetResourceComponents and StaticResourceComponents are cached if the system is not in development.
- Both components are added to the manifest for ServiceWorkers functionality for mobile applications
- StyleSheetResource uses the cache information to generate the eTag in case the component is cached
- Manifest component uses the isindevelopment implementation of the StaticResourceComponent to know if it should be empty (in development), or should contain all resources (not in development).

The main issue is that the implementation of the "isInDevelopment" method in StyleSheetResourceComponent and the StaticResourceComponent are not the same, and can return different results depending on the configuration of the system, and this can lead to very confusing behaviour.
Revision 2019-12-18 13:32 by marvintm
Steps To Reproduce The confusing behaviour we got was the following:
- We had an instance with a module which depended on the WebPOS set as in development. The rest of the modules were set as not in development.
- The StaticResourceComponent (correctly) considered that the instance was in development. The WebPOS was shown in development, the manifest was empty, and if the developer did a change in a js file, and refreshed the page, the JS file would be regenerated.
- However, the StyleSheetResourceComponent request, although reached the backend, returned 304 (not modified), because the eTag did not change.
- The reason for this is that the CSS was cached, and the eTag always returned the same checksum.

This was quite confusing because even though the system was in development, in order to test CSS changes you had to restart Tomcat everytime, which was quite annoying.
Revision 2019-12-18 13:25 by marvintm
Steps To Reproduce .


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker