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

[GAUD 7483] - Update tabs api > Rendering Workflow #5351

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

KearseTrevor
Copy link
Contributor

@KearseTrevor KearseTrevor commented Jan 28, 2025

JIRA Ticket: https://desire2learn.atlassian.net/browse/GAUD-7483

This ticket aims to address the rendering section of GAUD-7142.

So essentially the following (most from ticket, some my own):

  • Update render to render a tabs slot for the consumer provided tabs elements
  • Update render to not render d2l-tab-internal if the consumer has provided any elements in the tabs slot
  • Update render to render a new panels slot for the panel elements
  • Update _getPanel to query the correct slot
  • Implement a slotchange handler for the new panels slot
  • [-] Implement a new slotchange handler for tabs and panels slots that can manage the additions and removals, initializing the tabinfos, and measurement. This needs to work a bit different than the existing _handlePanelsSlotChange handler
  • Update _updateMeasures to measure using the tabs in the tabs slot instead of the internal d2l-tab-internal elements.
    • Note: we’ll want to query for those tabs using role="tab" since we can expect variant tab handles in the future.
  • Optionally add code to wait for all the slots to be updated, and wire up aria-controls. This is something we’re currently not supporting and would require some extra work in d2l-tabs. It probably adds minimal value at this point in time.
    • add updateAriaControls + error handling
    • Note: removal / edge case handling still needs addressing but technically not an issue either way, more like QoL
  • Add before & after slots to tab.js
  • Add temp demo to tabs.html page (at the bottom)

Note to reviewer: Currently need to massage some styling but meat of it is in. Also still minor work for _handlePanelsSlotChange ongoing

Next up: Focus workflow/section of ticket 7142

@KearseTrevor KearseTrevor requested a review from a team as a code owner January 28, 2025 16:08
Copy link
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5351/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

@KearseTrevor KearseTrevor changed the title [GAUD 7142] - Update tabs api > Rendering Workflow [GAUD 7483] - Update tabs api > Rendering Workflow Jan 28, 2025
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.

1 participant