Skip to content

Conversation

@DanBloxham-sw
Copy link
Contributor

@DanBloxham-sw DanBloxham-sw commented Nov 30, 2021

…ature flag

JIRA link

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

Description

Implemented the retrieval of incomplete action plan items for display the Current page in the learning portal. Did some minor refactoring of the existing page.

Screenshots

I've shown a few resources below (all have come from the API so presumably match how we expect the live resources to be).

  • One that has not been expanded
  • Expanded, but with empty description
  • Expanded with description
  • Expanded with overdue due date

Desktop:

Current page resource desktop

Tablet:

Mobile:


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.

@model CurrentCourseViewModel

<div class="searchable-element nhsuk-panel @Model.DateStyle()" id="@Model.Id-card">
<div class="searchable-element nhsuk-panel @Model.DateStyle()" id="@Model.Id-course-card">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that the current course card and self assessment card used the same Id template ("{Id}-card") which could conflict on the off chance the id of a self assessment matched the id of a course (which could be possible given they are at different tables). So I took the liberty to change these here.

}
}
@if (Model is LearningResourceCardViewModel resource) {
<div class="tag nhsuk-u-font-size-14" aria-describedby="@Model.Id-name">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just gave these tags the same styling as the tags in the other Current cards for courses and self assessments. So these are consistent with the page, but not consistent with tags we use elsewhere (e.g. tracking system filters).

Have a look at the screenshots and see if they look too much like buttons. Otherwise I can probably refactor the tags to look more like the tags we use elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

I do think the tags look confusingly like buttons a bit too much, especially because they are the same color as the Mark as complete and Edit buttons. I don't know if "Image" and "WebLink" are test values or values likely to be displayed in the tags, but if they are, it seems likely users would click on them thinking that will open the image or link. I think it would be worth making they look like the tags we use elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the tags on the learning resource cards (and added new tags for each type). I've not updated the old course and self assessment tags yet. I will ask Kevin a question in the slack thread about the new tags to see what he thinks of them. Images below:

Current page new tags desktop

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 that looks a lot better! And I support changing them on the other cards for consistency as long as Kevin okays that

@DanBloxham-sw
Copy link
Contributor Author

Still need to implement the UseSignposting feature management flag now that it is merged.

@DanBloxham-sw
Copy link
Contributor Author

UseSignposting feature management flag is now being used.

private const string LearningHubOpenApiKey = "LearningHubOpenAPIKey";
private const string LearningHubOpenApiBaseUrl = "LearningHubOpenAPIBaseUrl";
private const string UseSignposting = "FeatureManagement:UseSignposting";
public const string UseSignposting = "FeatureManagement:UseSignposting";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found out why it's good to have this as public - useful for unit tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough

Copy link
Contributor

@livzorn livzorn left a comment

Choose a reason for hiding this comment

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

Looking good, just a few questions and styling suggestions

SeqInt,
LastAccessedDate,
LinkedCompetencyLearningResourceID,
clr.LHResourceReferenceID AS LearningHubResourceReferenceID
Copy link
Contributor

Choose a reason for hiding this comment

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

slightly weird indentation here?

}
}
@if (Model is LearningResourceCardViewModel resource) {
<div class="tag nhsuk-u-font-size-14" aria-describedby="@Model.Id-name">
Copy link
Contributor

Choose a reason for hiding this comment

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

I do think the tags look confusingly like buttons a bit too much, especially because they are the same color as the Mark as complete and Edit buttons. I don't know if "Image" and "WebLink" are test values or values likely to be displayed in the tags, but if they are, it seems likely users would click on them thinking that will open the image or link. I think it would be worth making they look like the tags we use elsewhere.

Copy link
Contributor

@livzorn livzorn left a comment

Choose a reason for hiding this comment

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

Looking good, just left one more nickpicky styling suggestion which you can take or leave, and seems like the one weird indentation is still there on the sql is still there, but no need for rereview. I'll move this along so we can get more eyes on it sooner :)

Copy link
Contributor

@AlexJacksonDS AlexJacksonDS left a comment

Choose a reason for hiding this comment

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

A few comments around formatting.

private const string LearningHubOpenApiKey = "LearningHubOpenAPIKey";
private const string LearningHubOpenApiBaseUrl = "LearningHubOpenAPIBaseUrl";
private const string UseSignposting = "FeatureManagement:UseSignposting";
public const string UseSignposting = "FeatureManagement:UseSignposting";
Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough


Task<IEnumerable<ActionPlanItem>> GetIncompleteActionPlanItems(int delegateId);

Task<string?> AccessLearningResource(int learningLogItemId, int delegateId);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couldn't really think of a good name for this. Thoughts on this? Might be worth a refactor?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like how short and sweet it is but it does seem a bit ambiguous. The only other thing I can think of is GetLearningResourceLinkAndUpdateLastAccessedDate, which is a mouthful but would be clearer

Copy link
Contributor

@AlexJacksonDS AlexJacksonDS left a comment

Choose a reason for hiding this comment

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

I think this looks OK now, layout of the buttons on the cards is still a bit strange, but that is how they were before. At least we don't have tags styled the same way as buttons any more.

@DanBloxham-sw DanBloxham-sw merged commit 90e43ab into master Dec 6, 2021
@DanBloxham-sw DanBloxham-sw deleted the HEEDLS-659-ShowActionPlanInCurrent branch December 6, 2021 09:55
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