Moonshine-IDE / Super.Human.Portal

Portal interface to show documentation for DominoVagrant and Super.Human.Installer
Other
0 stars 1 forks source link

If nomad_helper_url is not available user should dismissable popover #54

Closed piotrzarzycki21 closed 1 month ago

piotrzarzycki21 commented 2 months ago

When user clicks on Nomad link and nomad_helper_url is not available user should get dismissable popover with message:

JoelProminic commented 2 months ago

We also want to compare the page for nomad_helper_url to the expected nomadhelper.html and show a similar warning if they don't match exactly. Genesis doesn't have access to install nomad_helper.html, so we want to have SuperHumanPortal verify that the nomad_helper.html installed by the administrator matches the copy under resources/.

If we are reading nomad_helper_url, then we need to safely handle the case where the URL doesn't resolve properly (because it was not properly configured). I would expect the administrator to test this, but until it is fixed, Super.Human.Portal should use the default logic instead.

A mismatching nomad_helper.html is not necessarily a blocker, so I think we should attempt to use the helper anyway in this case. If this fails, it should be handled by the callback logic.

piotrzarzycki21 commented 2 months ago

I have added warning window. With newest build it should be available for tests.

JoelProminic commented 1 month ago

@JustinProminic proposed that we add detailed setup instructions for nomadhelper.html in the popup. For example:

This link is currently configured to open in a separate HCL Nomad Web window. For the best user experience, the administrator needs to setup nomadhelper.nsf like this:

  • Copy %data_directory%/domino/html/Super.Human.Portal/js-release/resources/nomadhelper.html to /opt/hcl/domino/notes/latest/linux/nomad-files [Copy to Cllpboard] on your Nomad server
  • Update nomad_helper_url to %nomad_base_url%/nomadhelper.html [Copy to Clipboard] in SuperHumanPortal.nsf [Open in Notes] [Open in Nomad]

This will require that I update ConfigRead with at least these properties:

JoelProminic commented 1 month ago

I updated the ConfigRead agent with the required values:

Property Notes
domino_data_directory Currently hard-coded to /local/notesdata. I have some code to read this dynamically, but it feels like overkill.
domino_server_name Abbreviated format, so it should be ready for display
nomad_base_url The base URL for Nomad. nomad_helper_url (if populated) should be a superstring of this.
configuration_link A link to the Configuration view in SuperHumanPortal.nsf

Example:

{
  "errorMessage": "",
  "state": "authenticated",
  "common_name": "Anonymous",
  "config": {
    "ui_title": "Super.Human.Portal",
    "ui_documentation_editable": false,
    "nomad_base_url": "https://nomadweb.nomad-1010.nomadtest.com/nomad",
    "domino_data_directory": "/local/notesdata",
    "configuration_link": {
      "server": "nomad-1010.nomadtest.com/NOMADTEST",
      "database": "SuperHumanPortal.nsf",
      "view": "Configuration",
      "defaultAction": "nomad",
      "name": "SuperHumanPortal Configuration",
      "description": "This is an example link description for Super.Human.Portal.",
      "nomadURL": "https://nomadweb.nomad-1010.nomadtest.com/nomad/#/notes://nomad-1010.nomadtest.com/SuperHumanPortal.nsf/Configuration?OpenView",
      "type": "database",
      "url": "notes://nomad-1010.nomadtest.com/SuperHumanPortal.nsf/Configuration?OpenView"
    },
    "ui_documentation_show_unid": false,
    "domino_server_name": "nomad-1010.nomadtest.com/NOMADTEST",
    "nomad_helper_url": "https://nomadweb.nomad-1010.nomadtest.com/nomad/nomadhelper.html"
  },
  "username": "Anonymous",
  "status": "authenticated"
}
piotrzarzycki21 commented 1 month ago

@JoelProminic I have merged your changes to main. Let's work on main towards release. I have pushed changes which showing custom window. It requires more work on formatting text - if I found time later today I will try to adjust this. Let me know if this is enough good.

Screenshot 2024-05-16 at 13 47 29
piotrzarzycki21 commented 1 month ago

Question: I'm not sure what actually buttons copy should copy. Should I copy full text which is near button or less ?

JoelProminic commented 1 month ago

Yeah, I was expecting the [Copy to Clipboard] buttons to copy the corresponding path. I see I missed a button in the first line, though.

If we find this button doesn't fit well, we could remove them, but I'd like to see the paths formatted to stand out either way (for example, as monospaced text, or even as a separate block).

piotrzarzycki21 commented 1 month ago

Yeah, I was expecting the [Copy to Clipboard] buttons to copy the corresponding path. I see I missed a button in the first line, though.

This is aligned with other places where we have copy to clipboard like that.

piotrzarzycki21 commented 1 month ago

Yeah, I was expecting the [Copy to Clipboard] buttons to copy the corresponding path. I see I missed a button in the first line, though.

This is aligned with other places where we have copy to clipboard like that.

piotrzarzycki21 commented 1 month ago

@JoelProminic I have wrapped paths to tag and changed color - if it's too drastic let me know. :)

Screenshot 2024-05-17 at 14 01 19
piotrzarzycki21 commented 1 month ago

I have spent some time and improve look of that popup in dark mode. In light mode it changes a bit as well. Let me know if new build is acceptable.

JoelProminic commented 1 month ago

The updated prompt looks like this: image

Notes:

piotrzarzycki21 commented 1 month ago
  • For the first line, I was expecting to see the copy-to-clipboard button for both paths, so that they could be copied separately. Currently the full line is copied.
  • The "Open in Notes" button should be "Open in Client" to match the format for bookmarks.

@JoelProminic I have made an adjustment for these two items. It's available in the next build.

JoelProminic commented 1 month ago

The updates look good. The remaining issue for comparing nomadhelper.html has been moved to #57.