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

Replace sign_in.js by webcomponent #4023

Merged
merged 14 commits into from
Oct 5, 2022
Merged

Replace sign_in.js by webcomponent #4023

merged 14 commits into from
Oct 5, 2022

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Sep 20, 2022

This pull request replaces sign_in.j by a webcomponent. This is part of our js modernization.

I also added tabcompletion and higlighting matches to the datalist component. Which has a wider impact.

Old
image
Screenshot from 2022-09-20 14-19-51

New
image
image
image

Part of #3590

@jorg-vr jorg-vr added the chore Repository/build/dependency maintenance label Sep 20, 2022
@jorg-vr jorg-vr self-assigned this Sep 20, 2022
@jorg-vr jorg-vr mentioned this pull request Sep 20, 2022
9 tasks
@lgtm-com
Copy link

lgtm-com bot commented Sep 20, 2022

This pull request introduces 1 alert when merging bdabab2 into 7231018 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@jorg-vr jorg-vr marked this pull request as ready for review September 20, 2022 12:40
@jorg-vr jorg-vr requested a review from a team as a code owner September 20, 2022 12:40
@jorg-vr jorg-vr requested review from bmesuere and chvp and removed request for a team September 20, 2022 12:40
@lgtm-com
Copy link

lgtm-com bot commented Sep 20, 2022

This pull request introduces 1 alert when merging 999109a into 7231018 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@jorg-vr jorg-vr marked this pull request as draft September 20, 2022 13:47
@jorg-vr jorg-vr marked this pull request as ready for review September 21, 2022 07:49
@chvp chvp added the deploy mestra Request a deployment on mestra label Sep 26, 2022
@chvp chvp added deploy mestra Request a deployment on mestra and removed deploy mestra Request a deployment on mestra labels Sep 26, 2022
@chvp chvp temporarily deployed to mestra September 26, 2022 11:05 Inactive
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Sep 26, 2022
Comment on lines 176 to 182
function htmlEncode(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;");
}
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit hesitant about adding this function because it's incomplete. (and in combination with the unsafeHTML function where it's called). Is there an alternative?

Copy link
Contributor Author

@jorg-vr jorg-vr Oct 5, 2022

Choose a reason for hiding this comment

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

I don't see a way without the unsafe html that also marks the search results. And as the institution names are user input we need some kind of html encoding.

This method is an often suggested solution:

Some indeed change more keys. I will add those. They are more relevant when the string is used within html tags. But for a general util method it should cover all cases.

There is weirdly no standard javascript method for this. JQuery and lodash provide solutions, but we dont want to include those.

This might be a better alternative:

  var text = document.createTextNode(html);
  var p = document.createElement('p');
  p.appendChild(text);
  return p.innerHTML;
}```

Copy link
Member

Choose a reason for hiding this comment

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

@jorg-vr jorg-vr requested a review from bmesuere October 5, 2022 09:08
@jorg-vr jorg-vr merged commit de60ab7 into develop Oct 5, 2022
@jorg-vr jorg-vr deleted the chore/remove-bloodhound branch October 5, 2022 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Repository/build/dependency maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants