Skip to content

Dynamic Dashboard: Save and load last selected stock type for Stock card #12800

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

Merged
merged 7 commits into from
May 21, 2024

Conversation

itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented May 21, 2024

Closes: #12797
Part of #12754

Description

This PR updates AppSettingsStore and AppSettingsAction to support saving and loading last selected stock type for Stock card.

ProductStockDashboardCardViewModel has also been updated to load the last selected stock type upon initialization and set the selected stock type when it changes.

Testing instructions

  • Log in to a store and enable the Stock card on My Store.
  • Confirm that the initial selected stock type is Low stock.
  • Switch to a different stock type.
  • Relaunch the app, confirm that the last selected stock type is displayed instead of low stock.

Screenshots

N/A


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added the type: task An internally driven task. label May 21, 2024
@itsmeichigo itsmeichigo added this to the 18.8 milestone May 21, 2024
@itsmeichigo itsmeichigo marked this pull request as ready for review May 21, 2024 05:16
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented May 21, 2024

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr12800-ad7fdf1
Version18.7
Bundle IDcom.automattic.alpha.woocommerce
Commitad7fdf1
App Center BuildWooCommerce - Prototype Builds #9171
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@selanthiraiyan selanthiraiyan self-assigned this May 21, 2024
Copy link
Contributor

@selanthiraiyan selanthiraiyan left a comment

Choose a reason for hiding this comment

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

🚀

Base automatically changed from feat/12785-product-report-yosemite to trunk May 21, 2024 10:19
…StockDashboardCardViewModel.swift

Co-authored-by: Sharma Elanthiraiyan <sharma.elanthiraiyan@automattic.com>
@itsmeichigo itsmeichigo enabled auto-merge May 21, 2024 10:20
@itsmeichigo itsmeichigo merged commit ff22807 into trunk May 21, 2024
22 checks passed
@itsmeichigo itsmeichigo deleted the feat/12797-save-last-selected-stock-type branch May 21, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Persist and load last selected stock type using app setttings
3 participants