-
Notifications
You must be signed in to change notification settings - Fork 46
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
refactor(web): adopt TanStack Query for state management #1439
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joseivanlopez
approved these changes
Jul 8, 2024
jreidinger
added a commit
that referenced
this pull request
Jul 11, 2024
imobachgs
added a commit
that referenced
this pull request
Jul 17, 2024
This was referenced Jul 18, 2024
teclator
added a commit
that referenced
this pull request
Jul 23, 2024
imobachgs
added a commit
that referenced
this pull request
Jul 23, 2024
Adapt the users management code to use queries instead of `UsersClient`. Related to #1439.
dgdavid
added a commit
that referenced
this pull request
Jul 23, 2024
Similar to #1439, #1452, and #1470, this set of changes aims to replace the client/software with Tanstack queries. Note that was not possible to fully drop the software client. It has to wait until migration of [`WithStatus`](https://github.com/openSUSE/agama/blob/bd2f35d0ead6d74931189f5619579f6c3ffa2770/web/src/client/mixins.js#L83) and [`WithProgress`](https://github.com/openSUSE/agama/blob/bd2f35d0ead6d74931189f5619579f6c3ffa2770/web/src/client/mixins.js#L147) mixins too.
imobachgs
added a commit
that referenced
this pull request
Jul 25, 2024
At this moment, the code for working with product registration is not used. Moreover, it has to be migrated to a TanStack Query approach because reasons stated at #1439 Thus, we've agreed to drop it meanwhile in order to have less dead/unused/pending to adapt code. Please, note that changes were done on top of #1498, reason why would be nice to merge this after it. Additionally, it includes a removal of software typedef comments that were forgotten at #1483 and #1496.
imobachgs
added a commit
that referenced
this pull request
Jul 29, 2024
Follow-up of #1439 the goal of this PR is to change the progress track to use Tanstack Query.
imobachgs
added a commit
that referenced
this pull request
Aug 1, 2024
Follow-up of #1439. The goal of this PR is to change installer status tracking to Tanstack Query. Additionally, it adjust the HTTP API a bit. ## Notes The `WithStatus` mixin should not be relevant anymore. However, the storage UI still uses it to detect when the proposal changes. We should use a dedicated event instead.
dgdavid
added a commit
that referenced
this pull request
Aug 2, 2024
In the context of #1439, replace Questions client by its equivalent using TanStack Query. Additionally, it includes two commits with changes out of the scope of the PBI we're working on. Namely: * Migrates the _components/questions_ files to TypeScript, 560f953 * Stop re-exporting everything in _components/questions/index.ts_, 7c7b049 --- Related to https://trello.com/c/8u1WOJz4 (internal link)
teclator
added a commit
that referenced
this pull request
Aug 16, 2024
Adapt the network management code to use queries instead of NetworkCient. Related to #1439. Additionally, starts migrating the code to TypeScript and fixes bugs found by the type system. --- Reviewers, please note that this ended up being a rather long PR, reason why is better to not only review the code but also to do manual testing if possible. Take your time, but any issue out of the scope of state management / queries migration should be reported as a new issue to be addressed in a new PBI. --- Notes for creating follow-up work, * Fix WifiConnectionForm to avoid `"error": "Network system error: Network state error: Connection '<ssid>' already exists"` when connecting to hidden network that previously failed. In short, we should either, to drop the configuration created for a failed { hidden: true } connection or to implement a mechanism to know that such a configuration already exists and performs an _update_ instead of _add_. * Review when it's possible to define a gateway and fix the UI information accordingly * Check if we can use the type Address from ipaddr package instead of our own IPAddress type (most probably not) * Add support for IPv6 since as @jreidinger [said](#1519 (comment)) its usage is becoming more common. Look for `FIXME: IPv6 is not supported yet.` comments
Merged
imobachgs
added a commit
that referenced
this pull request
Sep 20, 2024
Prepare for releasing Agama 10· * #1263 * #1330 * #1407 * #1408 * #1410 * #1411 * #1412 * #1416 * #1417 * #1419 * #1420 * #1421 * #1422 * #1423 * #1424 * #1425 * #1428 * #1429 * #1430 * #1431 * #1432 * #1433 * #1436 * #1437 * #1438 * #1439 * #1440 * #1441 * #1443 * #1444 * #1445 * #1449 * #1450 * #1451 * #1452 * #1453 * #1454 * #1455 * #1456 * #1457 * #1459 * #1460 * #1462 * #1464 * #1465 * #1466 * #1467 * #1468 * #1469 * #1470 * #1471 * #1472 * #1473 * #1475 * #1476 * #1477 * #1478 * #1479 * #1480 * #1481 * #1482 * #1483 * #1484 * #1485 * #1486 * #1487 * #1488 * #1489 * #1491 * #1492 * #1493 * #1494 * #1496 * #1497 * #1498 * #1499 * #1500 * #1501 * #1502 * #1503 * #1504 * #1505 * #1506 * #1507 * #1508 * #1510 * #1511 * #1512 * #1513 * #1514 * #1515 * #1516 * #1517 * #1518 * #1519 * #1520 * #1522 * #1523 * #1524 * #1525 * #1526 * #1527 * #1528 * #1529 * #1530 * #1531 * #1532 * #1533 * #1534 * #1535 * #1536 * #1537 * #1540 * #1541 * #1543 * #1544 * #1545 * #1546 * #1547 * #1548 * #1549 * #1550 * #1552 * #1553 * #1554 * #1555 * #1556 * #1557 * #1558 * #1559 * #1560 * #1562 * #1563 * #1565 * #1566 * #1567 * #1568 * #1569 * #1570 * #1571 * #1572 * #1573 * #1574 * #1575 * #1576 * #1577 * #1578 * #1579 * #1580 * #1581 * #1583 * #1584 * #1585 * #1586 * #1587 * #1588 * #1589 * #1590 * #1591 * #1592 * #1593 * #1596 * #1597 * #1598 * #1600 * #1602 * #1605 * #1606 * #1607 * #1608 * #1610 * #1611 * #1612 * #1613 * #1614 * #1619 * #1620 * #1621
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello: https://trello.com/c/8u1WOJz4/3723-8-agama-ui-adopt-a-state-management-solution
Agama's UI state management could be better. For that reason, and after evaluating a few alternatives (see the list of considered alternatives), we decided to adopt Tanstack Query (former React Query).
Why TanStack query
What is included in this PR
There is quite some work to do so let's consider this pull request as the first step in this path. It introduces the following changes:
L10Provider
with a queries-based approach, including data mutation. Check queries/l10n.js if you are curious.Considered Alternatives
We had a look at others but did not consider them at all.