taxjar / taxjar-magento2-extension

Magento 2 Sales Tax Extension by TaxJar
http://www.taxjar.com/guides/integrations/magento2/
Open Software License 3.0
22 stars 30 forks source link

INT-2115: Remove unnecessary adminhtml UI notification #225

Closed sethobey closed 2 years ago

sethobey commented 2 years ago

Context

Closes #170

A message is displayed alerting Magento administrator to re-deploy production mode, when not necessary to do so.

Description

The first noticeable issue was that this message is displayed even when operation mode is not set to "production" which makes no sense.

Secondly, related code in our ConfigReview::class would suggest that re-deploying production mode is necessary when enabling/disabling address validation, but I cannot find any reason why that should be necessary. All necessary static assets are published and compiled assets generated when our module is enabled, so whether or not the address validation feature flag is enabled should have no effect on published/generated code.

Lastly, because one of the final actions of the suggested command bin/magento deploy:mode:set production is the clearing of caches, once the suggested command is ran, the same prompt will again be displayed as the current value will never equal the non-existent cached value, effectively creating an endless-loop if the M2 admin takes suggested action and then reloads page.

This PR removes the unnecessary notification message.

Performance

N/A

Testing

Issue 1

  1. Set M2 developer mode enabled and navigate to Store's Sales Tax configuration page.
  2. In TaxJar section, modify current address validation setting.
  3. Observe no redeploy production mode notification is displayed

Issue 2

  1. Set M2 to production mode and Taxjar address validation to enabled
  2. As customer, navigate to frontend, add item to cart and complete checkout, note absence of TJ address validation UI elements.
  3. As M2 admin, enable TJ address validation.
  4. As customer, navigate to frontend, add item to cart and complete checkout, note presence and functionality of TJ address validation UI elements without any need to redeploy production mode or any static assets.

Versions