Commit 753391c
authored
Remove stale theme entries in CSSTheme.updateResources (#4291)
Fixed #2698
When updating theme resources from CSS, if a property is removed from the CSS, it should be removed from the generated resource file. Previously, removed properties would persist as stale entries.
This change introduces a cleanup step in `updateResources` that iterates over modified UIIDs and removes all existing theme properties associated with them before applying the new properties from the CSS. A helper method `isOwnedBy` ensures that only properties strictly belonging to the UIID (and its states) are removed, preventing accidental deletion of unrelated properties even if UIIDs contain dots.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 94a4efb commit 753391c
1 file changed
Lines changed: 35 additions & 2 deletions
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1667 | 1667 | | |
1668 | 1668 | | |
1669 | 1669 | | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
1670 | 1685 | | |
1671 | | - | |
1672 | | - | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1673 | 1706 | | |
1674 | 1707 | | |
1675 | 1708 | | |
| |||
0 commit comments