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

Make it possible to link to other service/main site from Hajk #1336

Closed
jacobwod opened this issue May 10, 2023 · 4 comments
Closed

Make it possible to link to other service/main site from Hajk #1336

jacobwod opened this issue May 10, 2023 · 4 comments
Assignees
Labels
focus:accessibility idea module:client/core Core functionality (not a plugin)
Milestone

Comments

@jacobwod
Copy link
Member

jacobwod commented May 10, 2023

Overview

It turns out that there are cases where an organisation would want to link from the map view "back" to some other main landing site for the organisation. It might seem unnecessary given that user should be able to just open another tab and enter the URL (or have a bookmark in the browser…).

But one scenario where no such option is possible is when Hajk is running in kiosk mode on a touch device. This is a fairly common scenario in presentation lounges etc.

Documentation of the config options

Update 1
To enable this functionality, add the following to the map config JSON file:

// Make sure to remove the comments - they're not allowed in a plain JSON file
"linkInDrawer": {
    "href": "https://www.halmstad.se/", // URL to go to
    "newWindow": false, // Should the link open in a new tab or not? Adds `target="_blank"` if true.
    "text": "Gå till halmstad.se" // The text to display. Entire string will be clickable.
}

Update 2
Here's another example that clarifies the location of these new options in a map config file:
Skärmavbild 2023-05-15 kl  09 44 12

Requirements

  1. Easy to reach on a touch device
  2. Does not confuse user by overriding known functionality. This rules out making it a widget button or placing it in the toolbar, as those components already have a known functionality (namely opening a Hajk tool).
  3. Should be visible (or can be configured to be visible) at startup
  4. Non-obtrusive for current setups (if admin doesn't setup this URL, nothing should change in the UI)

Proposal

The best thing we can come up with is this:
MicrosoftTeams-image

@jacobwod
Copy link
Member Author

We're in a hurry to get this into production so the first commit will not contain the Admin parts. Instead, this option will be configurable in the map config file.

@jacobwod jacobwod self-assigned this May 15, 2023
@jacobwod jacobwod added module:client/core Core functionality (not a plugin) idea focus:accessibility labels May 15, 2023
@jacobwod jacobwod added this to the 3.12 milestone May 15, 2023
@jacobwod
Copy link
Member Author

The new link will always stay in the bottom. If there's no room, it will still be visible while the remains contents is scrollable.
Skärmavbild 2023-05-15 kl  09 17 34

@jacobwod
Copy link
Member Author

I verified that (at least) the NodeJS backend does not override this setting when saving in Admin UI. This is the request body sent from Admin to Backend:
Skärmavbild 2023-05-16 kl  12 55 00

So we're safe (@FredrikEkstrom79) even without fixing this in Admin as of now. I can't say how .NET behaves though.

@Hallbergs
Copy link
Member

Very nice addition!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus:accessibility idea module:client/core Core functionality (not a plugin)
Projects
None yet
Development

No branches or pull requests

2 participants