Skip to content

Apply enablement to all command links #111587

Closed

Description

Testing #111517

  • use the snippet below
  • have a command that toggles the context
  • 😕 the "big" button updates, the links aren't
		"viewsWelcome": [
			{
				"contents": "Hello [World](command:endgame-152.helloWorld).\n[Click Here](command:endgame-152.helloWorld)",
				"enablement": "endgame-152.helloWorld",
				"view": "debug"
			}
		]

Screenshot 2020-12-01 at 11 24 51

Activity

  1. gjsjohnmurray commented on Dec 1, 2020

    @gjsjohnmurray
    Contributor

    Maybe only do this for command links? It might be useful to be able to use a link to doc even before an extension is ready to have its commands called.

  2. jrieken commented on Dec 1, 2020

    @jrieken
    ContributorAuthor

    Yeah, command links is what I meant

  3. joaomoreno commented on Dec 1, 2020

    @joaomoreno
    Contributor

    John Murray (@gjsjohnmurray) Want to submit a PR? 👍

  4. added
    feature-request
    workbench-views
    on Dec 1, 2020
  5. gjsjohnmurray commented on Dec 4, 2020

    @gjsjohnmurray
    Contributor

    I started researching this, and ran into the question of how to disable a link (HTMLAnchorElement). Found an interesting article here. In summary, setting the href attribute to "" will prevent the link from functioning, and CSS selectors can be used to display a no-href one differently from a normal one. Does that sound like the way to go?

    If yes, perhaps add a boolean disabled property to ILinkStyles and have the applyStyles method of the Link class use this to swap the href in or out, stashing it in a data-href attribute before clearing it from href.

    What do you think?

  6. joaomoreno commented on Dec 4, 2020

    @joaomoreno
    Contributor

    Sounds good to me.

  7. added a commit that references this issue on Jan 5, 2021
    00dac2f
  8. gjsjohnmurray commented on Jan 5, 2021

    @gjsjohnmurray
    Contributor

    John Murray (@gjsjohnmurray) Want to submit a PR? 👍

    João Moreno (@joaomoreno) I have submitted #113841

  9. added a commit that references this issue on Jan 25, 2021
    b18634f
  10. joaomoreno commented on Jan 25, 2021

    @joaomoreno
    Contributor

    Verification steps from John Murray (@gjsjohnmurray):

    To test, create an extension that contributes a welcome view with an enablement expression and at least one command link in the contents. Verify that the link is only clickable when the expression is true. Include a regular link in the content and verify it is always clickable.

  11. added
    unreleased
    on Jan 25, 2021
  12. added
    verification-needed
    and removed
    unreleased
    on Jan 25, 2021
  13. added
    on-release-notes
    on Feb 1, 2021
  14. locked and limited conversation to collaborators on Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requeston-release-notesverification-neededverifiedworkbench-views

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions