Skip to content

Improve federation support #353

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

christophfriedrich
Copy link
Collaborator

Make federation info actually available to the utilised vue-components Collection, Collections, Processes, FileFormats.

This can already be used with the version of the js-client on the `federation-as-object` branch there.
@m-mohr m-mohr marked this pull request as draft April 9, 2025 23:18
@m-mohr
Copy link
Member

m-mohr commented Apr 9, 2025

Thanks. Setting to draft until we have a new version number for the JS client so that we can also update the dependency in the package.json.

The same request as in the Vue components: A screenshot would be nice ;-)

@christophfriedrich
Copy link
Collaborator Author

Good point that the dependency needs to be released and filled in before it makes sense to merge this.


Screenshot of FederationMissingNotice in Collections:

image

In Processes and FileFormats it looks alike. If nothing is missing, the notice just isn't there at all.

I didn't implement the ⚠️ icons yet that you wished for in #230 (comment), just concentrated on getting the Notices to work for now.


Screenshot of FederationNotice in Collection if it's online:

image

Currently still accompanied by FederationMissingNotice if it's offline:

image

That is redundant, which I addressed in Open-EO/openeo-vue-components#100, but I was kinda waiting for your feedback on Open-EO/openeo-vue-components#101 before changing it.

@m-mohr
Copy link
Member

m-mohr commented Apr 10, 2025

Thanks. We can keep it as is for now, the ⚠️ is more a nice-to-have, I'd say.

I've added more details to the issues and the PRs in vue-components.

@m-mohr m-mohr linked an issue Apr 10, 2025 that may be closed by this pull request
12 tasks
@christophfriedrich christophfriedrich marked this pull request as ready for review April 23, 2025 14:20
@christophfriedrich
Copy link
Collaborator Author

Screenshots:

Example in modal:

image

Example in wizard:

image

Example in user content panel:

image

Comment on lines +29 to 31
...Utils.mapState(namespace, ['missing']),
...Utils.mapState(namespace, {data: namespace}),
...Utils.mapState(namespace, ['pages', 'hasMore']),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
...Utils.mapState(namespace, ['missing']),
...Utils.mapState(namespace, {data: namespace}),
...Utils.mapState(namespace, ['pages', 'hasMore']),
...Utils.mapState(namespace, {data: namespace}),
...Utils.mapState(namespace, ['missing', 'pages', 'hasMore']),

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I kinda liked keeping all federation stuff together (line 28 and 29) and separating it from the rest (first two lines federation, then the rest)

Copy link
Member

Choose a reason for hiding this comment

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

I'd like to keep it as concise as possible to avoid potential confusion, I also had to look for a second to realize it's the same namespace. We also kept it together in all other instances.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fair enough, sounds reasonable too

@@ -112,6 +112,7 @@ export default ({namespace, listFn, paginateFn, createFn, updateFn, deleteFn, re
for (let d of data) {
state[namespace].push(d);
}
state.missing = data['federation:missing']; // yes, accessing a property on an array
Copy link
Member

@m-mohr m-mohr Apr 23, 2025

Choose a reason for hiding this comment

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

The missing is not initiated in the getDefaultState method above, I could imagine that this could become an issue and lead to the reactivity issues you faced

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good spot!! I added it to getDefaultState and the weird behaviour indeed went away. Let's see if this fix is more permanent now 😆

@christophfriedrich
Copy link
Collaborator Author

While taking the screenshots I realised that sometimes the FederationMissingNotice is displayed in the orangered colour it's supposed to have, sometimes in the darkgoldenrod of the FederationNotice:

image

image

I was able to reproduce: It is orange as long as no FederationNotice has been added to the DOM, then it changes to gold.

Probably need to adapt CSS specificity in FederationMissingNotice to overwrite more permanently, or not use the same class names for the two components in the first place. Could also make the style scoped? <style lang="scss" scoped>...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement support for the Federation Extension
2 participants