Enhancement Request: Ability for dnn-button to Generate a Link Instead
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- html, typescript
- Domain
- frontend
Research direction
Start at the dnn-button component entry point and inspect how it currently renders its button markup and handles attributes. Verify the requested href example and the existing button example render with matching styling, including the link's href, target, and role="button" output.
Written by the indexing model from the issue text.
Description
There are usability situations where a button should look like a button but actually be a link (HTML A tag).
I was thinking that it could be a simple switch, IF there is an href attribute, then emit an instead of .
Example
<dnn-button id="linkToAccordion" href="/tabid/58" target="_blank" class="btn btn-outline-dark rounded-0 text-nowrap mb-1 mr-1">Go to the Accordion page</dnn-button>
Would result in:
<a class="btn btn-outline-dark rounded-0 text-nowrap mb-1 mr-1" href="/tabid/58" target="_blank" role="button">Go to the Accordion page</a>
But the important thing is that the result look identical to the similarly crafted button:
<dnn-button id="buttonOptions" class="btn btn-dark rounded-0 text-nowrap mb-1 mr-1">Options</dnn-button>
Here is an example where the Link is outline and the Button is not and otherwise they follow the same style and can be used together in a UI.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DNNCommunity/dnn-elements
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
DNNCommunity/dnn-elements#1333 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
DNNCommunity/dnn-elements#1220 · 3 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
DNNCommunity/dnn-elements#1117 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
DNNCommunity/dnn-elements#1095 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 42/100
DNNCommunity/dnn-elements#1054 · 1 reaction ·
All issues in DNNCommunity/dnn-elements
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·