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

Fix #10631 New MapStore Home Page #10731

Merged
merged 16 commits into from
Jan 31, 2025

Conversation

allyoucanmap
Copy link
Contributor

@allyoucanmap allyoucanmap commented Dec 19, 2024

Description

This PR introduces changes on the plugins related to homepage and resources workflow.
Due to extensive changes the new plugins and related components has been included in a subfolder inside the plugins directory called ResourcesCatalog, here few reason about this structure:

  • in development phase used to ensure there was not dependencies with current homepage component
  • in general to isolate new components and facilitate the deletion of old one

It would be better if we formalize a way to structure related plugins and shared components, anyway this structure could be changed during the review or later on (eg. when deprecated components will be removed) to align it to the expected structure.

The plugins included and refactored are:

  • BrandNavbar: replacement for the OmniBar, this menu will be used in all pages as main menu. OmniBar will be used just for map viewers
  • DeleteResource: includes the delete workflow for all the resource category and it will replace all the specific ones
  • EditContext: adds buttons to the resource card for contexts
  • Footer: refactor of the product Footer plugin, it removes the image and it rely on the html translation for everything
  • HomeDescription: refactor of the product HomeDescription plugin
  • ResourceDetails: replacement for the resource editing dialog. It will be used both in view and edit mode
  • ResourcesFilterForm: a filter form panel available in the home for resources grid
  • ResourcesGrid: a resources grid/list view. This plugin replaces all the specific grids with a single one
  • Save: includes the save workflow for all the resource category and it will replace all the specific ones
  • SaveAs: includes the save as workflow for all the resource category and it will replace all the specific ones

Homepage with BrandNavbar, HomeDescription and ResourcesGrid used for featured and all resources and
image

ResourceDetails in view mode
image

ResourcesFilterForm with ResourcesGrid with list layout
image

BrandNavbar and ResourceDetails inside the map viewer
image

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Feature

Issue

What is the current behavior?

#10631

What is the new behavior?

Refactored homepage and workflows related to resources.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

@allyoucanmap allyoucanmap self-assigned this Jan 7, 2025
@allyoucanmap allyoucanmap linked an issue Jan 7, 2025 that may be closed by this pull request
8 tasks
@allyoucanmap allyoucanmap added New Feature used for new functionalities Homepage labels Jan 7, 2025
@allyoucanmap allyoucanmap added this to the 2025.01.00 milestone Jan 7, 2025
@allyoucanmap allyoucanmap marked this pull request as ready for review January 8, 2025 12:05
@tdipisa tdipisa requested a review from offtherailz January 8, 2025 12:53
Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Home page

Home page - Featured

  • How to make maps features/unfeatured? I coudn't find how to.
  • Featured has the main purpose of putting some items on top of the page. If this list have to be paginated, maybe a "carousel" that auto-present featured items is more indicated to browse pages.
  • Featured are filtered too, but here graphically it looks that filter applies only on contents. I don't is a little unclear to me, but it's opinable.
    image
  • Italian and french translation broken
    image
  • Change "View resource properties" --> "Open resource properties" , or simply "open properties".
    image

Home - Grid view

  • Sticking the pagination to the bottom of the window gives the illusion that there are no more rows, but they are present, scrolling down. Personally I'd perfer a continuous scrolling, istead of pagination. To solve this misunderstanding, you could put the scroolbar on bottom, without sticky effect, or clearely indicate how many items per pages you loaded.
    image
  • The icon for advertized in yellow is not readable (too small). You can use black color
    image
    image
  • The map context indcator shows the cursor to be clickable, but is not clickable. We should indicate better the meaning in the tooltip. ("This map uses the context 'demo_context' ").
    image
  • The icon of the user shows the cursor clickable, but is not (if click, nothing happens) only if I click on the user name the resources are filtered by creator. A tooltip should indicate that clicking on the name "filter by user". Also the user
    • The information of the creator should maybe be hidden to users that are no logged in, as well as the application hides the created by and the modified by options.
  • Is not clear the role of the user in the card (creator, owner...). Ideally I expect to have the owner, but it looks to be the creator. Now they are the same, but when the ownership can be changed, also this need to be keept aligned (probably now is not possible to filter by owner). A tooltip on the user icon may clarify this.

Home - Tabular view

  • Default Name column is too big
    image
    I'd suggest something like this:
    image
  • columns Modified and Created by are a little unconsistent. The information to display in couples are usually "Created by" and "Created at" or "Last modified at" and "Last modified at". Probably you wanted to indicate "Last modified" and "Owner". It could be cool to allow to select teh columns to show via UI.
  • Modified column is too small, increase a little the size to show the full date, or use a more compact format for the date.
  • When date is not present, do not show a clock with empty text, but "N/A", "Unknown".
  • Menus are a little misaligned, reduce the text length may help.
    image

Home - Filters

  • Maybe its a minor thing, but could be good to avoid this condition when apply a maps by context filter and not including maps, by disabling that tool (and not applying) when map is not selected.
    image

Map

  • Old contexts may display like this: (e.g. http://localhost:8081/#/context/session_all_plugins

image
session_all_plugins-context.json

  • Please use tooltips on top bar properties, save, save as items.
  • The multi-floppy is usually the icon of save all, not "Save as...". Looking on internet, I see that the "Save As..." functinality is indicated with a floppy with a pencil, or a a floppy with "...". Something like this:
    image
  • While loading, save button shows changes. It should be disabled and not show changes until loaded.
  • When I change something on the map, both save and save as buttons show modified indicator. I think that only one should show it (if saved, save, if not saved,only save as button is present, so only save as button should show the indicator).
  • Creating a new map from home page, I'm allowed to leave without saving.
  • I noticed this difference opening same context/map locally or on dev ) notice gian legend on left) /demo_context/46500
    image

Doc

  • Do we need to migrate old contexts somehow?
  • Need to update migration guidelines indicating the changes to apply on local config (monitored state, plugins).
  • I noticed that many things has not been removed. What is the policy we want to use?
    • Deprecate: in this case, we need to indicate the plugins deprecated, and sooner deleted, with old components that are not used anymore.
    • Delete: in this case we should remove the plugins at all, so the depending project are forced to migrate.
  • JSDoc should be updated accordingly, documenting new home page plugins and marking as deprecated the others.

Config

  • PluginsConfig should be updated with new plugins, to compose context with new plugins and settings.

Other issues, to check on geostore.

  • Creator filter do not work, and also first page shows 11 results, but they look to be geostore problems.
  • Sort by do not look workling yet

}


export default createPlugin('BrandNavbar', {
Copy link
Member

Choose a reason for hiding this comment

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

Document this plugin

@allyoucanmap
Copy link
Contributor Author

@axl8713 could you help me to fix the problem in the test-back-end check?
https://github.com/geosolutions-it/MapStore2/actions/runs/12946955404/job/36112504186?pr=10731

@allyoucanmap
Copy link
Contributor Author

@tdipisa here I reported what discussed and agreed (cc @offtherailz)

How to make maps features/unfeatured? I coudn't find how to.

This can be done from the Resource details panel, there is a checkbox for admin users

image

Featured has the main purpose of putting some items on top of the page. If this list have to be paginated, maybe a "carousel" that auto-present featured items is more indicated to browse pages.

I’m going to open an issue to keep track of this

Featured are filtered too, but here graphically it looks that filter applies only on contents. I don't is a little unclear to me, but it's opinable.

An idea could be to introduce a global search visible centered with an inline filter button

Sticking the pagination to the bottom of the window gives the illusion that there are no more rows, but they are present, scrolling down. Personally I'd perfer a continuous scrolling, istead of pagination. To solve this misunderstanding, you could put the scroolbar on bottom, without sticky effect, or clearely indicate how many items per pages you loaded.

For the moment we agreed to keep this as is

The multi-floppy is usually the icon of save all, not "Save as...". Looking on internet, I see that the "Save As..." functinality is indicated with a floppy with a pencil, or a a floppy with "...". Something like this:

For the moment I restored the old icon, I’m going to open an issue to review this icon and the open properties icon

I noticed this difference opening same context/map locally or on dev ) notice gian legend on left)

This happens because the dev instance has the interactive legend activated

Need to update migration guidelines indicating the changes to apply on local config (monitored state, plugins).
JSDoc should be updated accordingly, documenting new home page plugins and marking as deprecated the others.

Documentation will be managed in a separate issue

I noticed that many things has not been removed. What is the policy we want to use?
Deprecate: in this case, we need to indicate the plugins deprecated, and sooner deleted, with old components that are not used anymore.
Delete: in this case we should remove the plugins at all, so the depending project are forced to migrate.

For the moment I marked the deprecated plugins, I’m going to open an issue to remove the unused plugins and code

PluginsConfig should be updated with new plugins, to compose context with new plugins and settings.

Here we should evaluate which new plugins should be included in the context (probably BrandNavbar and ResourceDetails), opening an issue to investigate this

@tdipisa
Copy link
Member

tdipisa commented Jan 24, 2025

@offtherailz we are ready for a new review. Further PRs will be opened for the agreed rest according to what reported by @allyoucanmap above. Thank you.

@allyoucanmap
Copy link
Contributor Author

@tdipisa new issues opened and connected to the epic

Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

Testing the final version with GeoStore I noticed some grave instability that blocks the testing of all the components (e.g. in contexts).

Other minor issues

  • Import/Export close is partially hidden.
    image

@tdipisa
Copy link
Member

tdipisa commented Jan 28, 2025

Thank you @offtherailz. It would be good if you @allyoucanmap can have a look asap maybe with also @axl8713 to quickly investigate and unblock the state of this.

@tdipisa
Copy link
Member

tdipisa commented Jan 28, 2025

@offtherailz this PR should fix the above. Let's wait for a new deployment.

@offtherailz
Copy link
Member

offtherailz commented Jan 28, 2025

ok. Now it works. For the rest of the issues, you can decide if procede after merge.
Allowing me to create contexts, I noticed, apart from the issues above, also that:

  • context with burger menu are not working anymore. If we don't want to support it anymore, let's remove it the burger menu once for all
  • It should be possible to add the new plugin for top bar in pluginConfig.json, maybe added by default.

@allyoucanmap
Copy link
Contributor Author

@offtherailz I fixed the burger menu problem

It should be possible to add the new plugin for top bar in pluginConfig.json, maybe added by default.

for this there is a dedicated issue #10781

Copy link
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

It looks working very well now (apart for the separated issues already known).

@tdipisa tdipisa merged commit ff45960 into geosolutions-it:master Jan 31, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Homepage New Feature used for new functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New MapStore Home Page
3 participants