-
Notifications
You must be signed in to change notification settings - Fork 186
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
Update tree view to include new metadata #3344
Update tree view to include new metadata #3344
Conversation
@rtibbles @bjester -- I am going to make the PR description more robust for Jessica's review with screenshots to ensure I am displaying all scenarios correctly, but I would be happy to have some eyes on the code to see if I have actually done what I think I have done :) So, if you have time to take a look, that would be great. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of updates needed.
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
…r exercise completion goals
… to new learning activities icons
7f9fe3d
to
7af6586
Compare
Updated viewsThis PR has been updated to include the card and resource panel display of metadata on default, compact, and comfortable views with the new metadata icons. At this point, the only outstanding piece will be to add completion and duration display as a follow up issue Figma, for reference Note: after discussion in KDS re: existing icon colors and accessibility concerns - we opted to move forward with the grey chip with colored icon. |
…lace original to avoid collisions and very broad refactoring
cbacb0f
to
36d9672
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @marcellamaki . Below you can find notes that I think would be good to address (some may need only a clarification) before we merge. I’ll also post some comments in the code and mark those that are not blocking appropriately.
1. Possible visual regressions in other features
Updates in this PR affect other features, not only the channel tree navigation. One example would be the “Import from channels” feature:
Before | After |
---|---|
Before we merge this, I’d appreciate clarification on whether this was intended because from the user's point of view, the new version seems to be confusing to me since now they won’t be able to understand resources presented very well when importing from other channels.
I haven’t checked other features that may be affected by the update, this is only one example. In general, I’d suggest uploading before/after changes for every UI update. I know it can be lots of work and you already made a great effort and uploaded tons of screenshots, but don’t know about any better way how to prevent regressions or communicate that there were changes in places beyond the new feature implemented. As for the reviewer role, it’s hard to find all the places to check, and even when one can derive something from code, it’s hard to recognize whether changes were intended or not.
2. @formatjs/intl
Is there any advantage of installing the whole library when compared to using polyfills together with capability detection? Generally speaking, I’d say it’s better to include only what’s needed so that the app won’t grow and that native APIs will be used whenever possible. I can see that @rtibbles made some suggestions about polyfills earlier, any thoughts?
3. Lack of tests for new components or updates to existing ones
One of the examples would be the new ContentNodeLearningActivityIcon
which contains lots of conditional logic which causes that (at least to me) it takes a while to understand all scenarios that could happen even when it’s a relatively simple component. There are also updates to existing components like ResourcePanel
and Thumbnail
. There’s no need to have a complex test suite, just a couple of main scenarios would be helpful.
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
...ntcuration/contentcuration/frontend/channelEdit/components/ContentNodeListItem/index.spec.js
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ResourcePanel.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/shared/views/files/Thumbnail.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeListItem/index.vue
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/shared/views/ContentNodeLearningActivityIcon.vue
Outdated
Show resolved
Hide resolved
contentcuration/contentcuration/frontend/shared/views/ContentNodeLearningActivityIcon.vue
Outdated
Show resolved
Hide resolved
<slot name="navigation"></slot> | ||
<ContentNodeLearningActivityIcon v-if="isTopic" :isTopic="true" includeText chip /> | ||
<ContentNodeLearningActivityIcon | ||
v-else-if="hasLearningActivities" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking, this can stay as is. Just an idea for rows 9-15 if you'd find it helpful. Maybe having another component, TopicIcon
, separated from ContentNodeLearningActivityIcon
would help with understanding and using ContentNodeLearningActivityIcon
.
…or new work to avoid regressions or collisions
Hi @MisRob - thank you for your comprehensive review! |
Thank you, @marcellamaki. Regarding polyfills, thank you for the comment, I wasn't aware of the relationship to If we want to keep using just polyfills instead of bringing in the whole library as I suggested earlier and is implemented in your latest changes, some last touches would be needed:
To put this all together, I think that we only need to have
|
New tests are looking good to me, thank you. I also skimmed briefly through |
@MisRob, following the discussion in the planning meeting, I've updated just to remove the polyfill, and use the default Intl.ListFormat (since it aligns with the browsers we support). I hope after that final commit is reviewed, this is ready, but please let me know if there is anything else you see 😄 |
…udio do not require polyfillin g
d9c3732
to
df352dc
Compare
75a6da5
to
f454798
Compare
…r than stand alone
Thank you, @marcellamaki. The latest updates are looking good to me (haven't tested again manually). Regarding code, the only thing - could you revert changes of package.json (and therefore of yarn.lock as well)? We don't need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience, and sorry for the complications about polyfills, I misunderstood our needs and dependencies.
I think the lack of clarity wasn't helped by me either - plenty of blame to go around! |
Looks good to me, have reported one related issue separately: #3664 |
Thanks @pcenov -- I will assign that issue to myself to fix the remaining problems! |
Summary
Description of the change(s) you made
Fixed #3206
Adds titles and metadata in the Resource Panel for Studio.
Does not add or update the Learning Activity Label or icons (follow up PR forthcoming)
Manual verification steps performed
Screenshots (if applicable)
Reviewer guidance
How can a reviewer test these changes?
Are there any risky areas that deserve extra testing?
References
Comments
Contributor's Checklist
PR process:
CHANGELOG
label been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocs
label has been added if this introduces a change that needs to be updated in the user docs?requirements.txt
files also included in this PRStudio-specifc:
notranslate
class been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages
,components
, andlayouts
directories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarn
andpip
)