Skip to content

Commit

Permalink
fix: sync changes from v2 to v2-develop (#866)
Browse files Browse the repository at this point in the history
* fix: improve action separator and treeactions bar

* feat: extract toolbar behaviour to hooks

gisce/webclient#1646

* feat: improve actionbar components with react best practices

gisce/webclient#1646

* feat: add new localization strings and improve One2many top bar

gisce/webclient#1646
- Added new localization strings for creating, searching, and navigating items in Catalan, English, and Spanish.
- Enhanced the One2many input components to utilize the toolbar from the current view, improving user experience and consistency across the application.

* feat: improve form handling and toolbar integration in One2many components

gisce/webclient#1646
- Added formRef to improve form submission handling in the FormActionBar and useFormToolbarButtons hooks.
- Refactored One2manyForm to support forwarding refs, enabling better integration with form functionalities.
- Updated One2manyInput and One2manyInputInfinite to utilize formRef for improved form management.
- Enhanced One2manyTopBar to integrate formRef and streamline toolbar button actions.

These changes improve the overall user experience and maintainability of the One2many components.

* feat: allow use of hooks from one2many's

* Merge branch 'v2' into feat/add-toolbar-buttons-to-x2many

* fix: bad conflict resolution

* fix: adjust sharebutton for formactionbar

* fix: remove unused function

* fix: adjust value key filtering in URL sharing

- Added "parent_id" to the allowed values keys in URL parameters
- Updated useUrlFromCurrentTab to include form values in the actionRawData.
- Modified RootView to merge filtered values with global values
- Ensured getPlainValues in Form handles potential null values for getValues and getFields.

* fix: improve value merging logic in useUrlFromCurrentTab

- Updated the logic to prioritize form values over action values for non-tree views.
- For tree views with active_ids, merged form values with action values.
- Simplified the final action data structure by directly assigning merged values.

* fix: improve and export parameter filtering

* fix: transform initialView to initialViewId

* fix: also clear url when closing all tabs

* chore(release): 2.58.1 [skip ci]

## [2.58.1](v2.58.0...v2.58.1) (2025-01-28)

### Bug Fixes

* adjust value key filtering in URL sharing ([9fd9d6a](9fd9d6a))
* also clear url when closing all tabs ([bf072e5](bf072e5))
* clear title when no tabs ([68d42f0](68d42f0))
* improve and export parameter filtering ([c79c3e0](c79c3e0))
* improve value merging logic in useUrlFromCurrentTab ([1b5d7dd](1b5d7dd))
* transform initialView to initialViewId ([28fff0a](28fff0a))

* feat: fetch toolbar if needed and if view of one2many is hardcoded

gisce/webclient#1646

* fix: temporally disable toolbar in one2many's until we decide which design path follow

* chore(release): 2.59.0 [skip ci]

# [2.59.0](v2.58.1...v2.59.0) (2025-01-28)

### Bug Fixes

* adjust sharebutton for formactionbar ([b9f3d30](b9f3d30))
* bad conflict resolution ([6c09769](6c09769))
* improve action separator and treeactions bar ([c520994](c520994))
* remove unused function ([c68ec43](c68ec43))
* temporally disable toolbar in one2many's until we decide which design path follow ([7470e76](7470e76))

### Features

* add new localization strings and improve One2many top bar ([0081027](0081027))
* allow use of hooks from one2many's ([0419afe](0419afe))
* extract toolbar behaviour to hooks ([1600b5c](1600b5c))
* fetch toolbar if needed and if view of one2many is hardcoded ([6251874](6251874))
* improve actionbar components with react best practices ([4e8627e](4e8627e))
* improve form handling and toolbar integration in One2many components ([4d82eac](4d82eac))

* fix: restore bad conflict resolution

* chore(release): 2.59.1 [skip ci]

## [2.59.1](v2.59.0...v2.59.1) (2025-01-28)

### Bug Fixes

* restore bad conflict resolution ([fd9d10f](fd9d10f))

* fix: ditch the view get API call in one2many for the moment (#864)

gisce/webclient#1745

* chore(release): 2.59.2 [skip ci]

## [2.59.2](v2.59.1...v2.59.2) (2025-01-29)

### Bug Fixes

* ditch the view get API call in one2many for the moment ([#864](#864)) ([e89afa4](e89afa4))

---------

Co-authored-by: Marc Güell Segarra <marc@ondori.dev>
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Jan 29, 2025
1 parent b7bb47b commit bd86e89
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/react-ooui",
"version": "2.59.1",
"version": "2.59.2",
"engines": {
"node": "20.5.0"
},
Expand Down
9 changes: 5 additions & 4 deletions src/widgets/base/one2many/One2many.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ export const One2many = (props: Props) => {

if (oouiViews && oouiViews[type]) {
const view = oouiViews[type];
if (!view.toolbar && (type === "form" || type === "tree")) {
const viewWithToolbar: TreeView | FormView = await getViewPromise;
return { ...view, toolbar: viewWithToolbar.toolbar };
}
// TODO: Replace with the new API call to retrieve only the toolbar
// if (!view.toolbar && (type === "form" || type === "tree")) {
// const viewWithToolbar: TreeView | FormView = await getViewPromise;
// return { ...view, toolbar: viewWithToolbar.toolbar };
// }
return view;
}

Expand Down

0 comments on commit bd86e89

Please sign in to comment.