quarto-dev / quarto-dev/quarto-cli

extension navbar merging needs order

Open
#9,474 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement extensions websites
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

When a custom project type defined by an extension configures navbar entries, a project which uses that extension cannot control the order that its own navbar entries are merged.

For example, when the extension has configuration like:

contributes:
  project:
    project:
      type: website
    website:
      navbar:
        pinned: true
        right:
         - icon: "list"
           menu:
           - text: "docs.posit.co"
             href: "https://docs.posit.co"
           - text: "Posit Support"
             href: "https://support.posit.co/hc/en-us/"

A project using this extension might have additional navbar configuration like:

website:
  navbar:
    right:
      - text: "Release Notes"
        url: "https://docs.posit.co/ide/news/"

When rendered, the navbar entries from the project-type are rendered to the left of the navbar entries from the project itself.

image

Custom project types and projects should have some way of determining the final order for navbar items.

This same problem likely happens when other types of list-like configurations are merged, like page-footer entries.

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how navbar entries from extension-defined project types are merged with entries from the project configuration. Reproduce the example using the shown YAML and compare the rendered order, then determine how list-like settings such as page-footer entries are handled. Done means projects can explicitly control the final order of merged navbar items.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.