Skip to content
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

ffy-filter.js Error obtaining categories alert window. #24

Open
UladzimirLitvinchuk1 opened this issue Sep 8, 2021 · 0 comments
Open

Comments

@UladzimirLitvinchuk1
Copy link

I would like to suggest improving the user experience for authors.
The fact is that in the case when the user is not logged in to Frontify in the side bar (new build, configuration change or connection/configuration problems, etc.), there is a high probability of an error message ("Error obtaining categories") and the way of displaying it on the screen is very annoying for the authors, every time when they open/create a new page, they may encounter, and in most cases they constantly encounter this modal window. On many projects, two approaches are used simultaneously (DAM and FFY) for a very long time, for example, during the migration of the solution to use Frintify, therefore, this problem becomes a difficulty for many authors who may not even work with Frontify. Information about problems with connecting to Frontify is not mandatory for authors, it is necessary for developers, so it is possible to use the browser console for these purposes for example.

ui.frontend/src/main/webpack/site/components/ffy-filter.js lines 37 and 43

var localCategories = sessionStorage.getItem("ffy.categories");
if (localCategories == null || localCategories == undefined) {
try {
data = await graphQLClient.request(query);
} catch (error) {
$(window).adaptTo("foundation-ui").alert("Error", "Error while executing the search");
}
if (data != null || data != undefined) {
sessionStorage.setItem("ffy.categories", JSON.stringify(data));
localCategories = JSON.stringify(data);
} else {
$(window).adaptTo("foundation-ui").alert("Error", "Error obtaining categories");
}
}

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

No branches or pull requests

1 participant