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

[Notebook] Links are sometimes not formatted #6202

Closed
1 of 7 tasks
jvigliotta opened this issue Jan 26, 2023 · 13 comments · Fixed by #6255, #6317 or #6344
Closed
1 of 7 tasks

[Notebook] Links are sometimes not formatted #6202

jvigliotta opened this issue Jan 26, 2023 · 13 comments · Fixed by #6255, #6317 or #6344

Comments

@jvigliotta
Copy link
Contributor

jvigliotta commented Jan 26, 2023

Summary

Sometimes when pasting in links you can get into a state where urls aren't formatted/purged of tags. Needs more investigation and a fix.

Expected vs Current Behavior

Should always work anytime an entry is edited in any way.

Steps to Reproduce

  1. Copy and paste a whitelisted url (domain ending in nasa.gov) link in
  2. To exit click rapidly in a blank area underneath the entries, notice the text is not formatted

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@jvigliotta jvigliotta self-assigned this Jan 26, 2023
@akhenry akhenry added this to the Target:2.1.6 milestone Jan 26, 2023
@jvigliotta
Copy link
Contributor Author

Looks like the issue was that links were being saved in the configuration for entries unnoticed because they are always formatted in the view. The fix is to sanitize before saving AS well.

@jvigliotta
Copy link
Contributor Author

jvigliotta commented Feb 2, 2023

Testing

  • enter valid links into both notebooks and restricted notebooks (ask for valid link domains when testing)
  • search for anything and make sure search is working and that terms inside of valid links ALSO highlight and the links still works

Old Testing (still do)

  • follow the repro steps
  • in the console, console.log(await openmct.objects.get([notebookKeyString]))
  • go to configuration.entries.[randoUuid].[anotherRandoUuid] and verify there are no tags in the entries

@shefalijoshi
Copy link
Contributor

This doesn't appear to be working. This is what I see:
image

@akhenry
Copy link
Contributor

akhenry commented Feb 9, 2023

@shefalijoshi URL highlighting only works for whitelisted URLs. In our test environment anything that ends in .nasa.gov should work.

@shefalijoshi
Copy link
Contributor

shefalijoshi commented Feb 9, 2023

A couple of things are happening here:

  1. A new link that I add does highlight and i am able to click it just fine.
  2. If I navigate away to a different object in the tree and return to my notebook, now the URL is not highlighted
  3. If I select the URL entry and delete everything from that entry so that it is empty, then press enter or click away from the empty entry, the entry text/url comes back. (But this is not link specific, any test cannot be cleared completely from an entry)

@akhenry
Copy link
Contributor

akhenry commented Feb 9, 2023

Oh, dang, yeah, URLs do not get highlighted when you nav away and back.

@akhenry
Copy link
Contributor

akhenry commented Feb 9, 2023

Not fixed for reasons above.

@khalidadil
Copy link
Contributor

I'm seeing the same issues as @shefalijoshi here

@unlikelyzero
Copy link
Collaborator

Fix #2 ignore the rest (even if you're in there)

@akhenry
Copy link
Contributor

akhenry commented Feb 13, 2023

@rukmini-bose to test

@rukmini-bose
Copy link
Contributor

rukmini-bose commented Feb 13, 2023

Testathon 2/13:
Notebook links are formatted incorrectly in Notebook Shift Logs after the page has been committed.
Apart from that, Links are formatted correctly.

Screen Shot 2023-02-13 at 2 29 19 PM

When we retest this, we need to make sure we test not only the formatting of the links, but also ensure that clicking the link takes us to the correct page. Right now, whitelisted links give us a 404 Error.

@ozyx
Copy link
Member

ozyx commented Feb 16, 2023

Verified fixed -- Testathon 2-15-2023

@rukmini-bose
Copy link
Contributor

Verified 2/15/23 yay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment