Skip to content

Conversation

@DanBloxham-sw
Copy link
Contributor

@DanBloxham-sw DanBloxham-sw commented Mar 24, 2022

JIRA link

https://softwiretech.atlassian.net/browse/HEEDLS-809

Description

Fixed the copy course link button to copy the course link again. Details of the issue are in the comment on the ticket.
Not sure if the modifications to the SearchSortFilterPaginate JS are the best approach here. Do let me know if you have a better suggestion.

Screenshots

N/A


Developer checks

(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the formatter and made sure there are no IDE errors.
  • Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
  • Manually tested my work with and without JavaScript. Full manual testing guidelines can be found here: https://softwiretech.atlassian.net/wiki/spaces/HEE/pages/6703648740/Testing
  • Updated/added documentation in Swiki and/or Readme. Links (if any) are below:
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken.
  • Scanned over my own MR to ensure everything is as expected.

Copy link
Contributor

@GeorgeBlackwell GeorgeBlackwell left a comment

Choose a reason for hiding this comment

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

Nice work!

Copy link
Contributor

@JBsoftwire JBsoftwire left a comment

Choose a reason for hiding this comment

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

A couple of nitpicks.

}

function defaultVoidFunction(): void {
return undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure it's permitted by the linter, but I'd find it neater to have an empty function rather than an undefined return. But if you think otherwise it's not important.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, that was what I had first tried to go for at first, but the linter disagreed. This was the cleanest solution that I could find that pleased it.

return element.getAttribute('data-filter-value')?.trim() ?? '';
}

private displaySearchableElementsAndRunSuppliedFunction(searchableElements: ISearchableElement[])
Copy link
Contributor

Choose a reason for hiding this comment

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

I think 'runPostDisplayFunction' or something like that would be clearer than 'runSuppliedFunction'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I've renamed it.

Copy link
Contributor

@JBsoftwire JBsoftwire left a comment

Choose a reason for hiding this comment

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

LGTM

@DanBloxham-sw DanBloxham-sw merged commit 94054f9 into master Mar 28, 2022
@DanBloxham-sw DanBloxham-sw deleted the HEEDLS-809-CopyCourseLinkButtonFix branch March 28, 2022 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants