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

fix not rendered style when style is optional #4528

Merged

Conversation

Yokozuna59
Copy link
Member

@Yokozuna59 Yokozuna59 commented Jun 24, 2023

📑 Summary

fix not rendered style when style is optional, see #4527 for more info.

Resolves #4527

📏 Design Decisions

It appears that functions are considered empty object when using isEmpty from lodash-es/isEmpty, so I set the second parameter function as optional and validate it's not undefined.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 📓 have added documentation (if appropriate)
  • 🔖 targeted develop branch

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2023

Codecov Report

Merging #4528 (64a28be) into develop (2fe5750) will increase coverage by 3.98%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4528      +/-   ##
===========================================
+ Coverage    79.97%   83.95%   +3.98%     
===========================================
  Files          136      136              
  Lines        10446    10446              
  Branches       492      492              
===========================================
+ Hits          8354     8770     +416     
+ Misses        1928     1529     -399     
+ Partials       164      147      -17     
Flag Coverage Δ
e2e 83.84% <100.00%> (+4.01%) ⬆️
unit 28.28% <40.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/mermaid/src/diagram-api/diagramAPI.ts 83.33% <100.00%> (+7.33%) ⬆️
packages/mermaid/src/styles.ts 100.00% <100.00%> (+33.33%) ⬆️

... and 39 files with indirect coverage changes

packages/mermaid/src/styles.ts Outdated Show resolved Hide resolved
@Yokozuna59 Yokozuna59 force-pushed the bug/4527_fix-optional-style-issue branch from 1ab7ebe to f2c4027 Compare June 26, 2023 15:06
packages/mermaid/src/styles.ts Outdated Show resolved Hide resolved
packages/mermaid/src/styles.ts Outdated Show resolved Hide resolved
@sidharthv96 sidharthv96 merged commit 2bec827 into mermaid-js:develop Jun 27, 2023
13 checks passed
@sidharthv96
Copy link
Member

Thanks @Yokozuna59 🚀

@Yokozuna59 Yokozuna59 deleted the bug/4527_fix-optional-style-issue branch June 27, 2023 06:03
github-merge-queue bot pushed a commit to fuxingloh/contented that referenced this pull request Jul 2, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mermaid](https://togithub.com/mermaid-js/mermaid) | [`10.2.3` ->
`10.2.4`](https://renovatebot.com/diffs/npm/mermaid/10.2.3/10.2.4) |
[![age](https://badges.renovateapi.com/packages/npm/mermaid/10.2.4/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/mermaid/10.2.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/mermaid/10.2.4/compatibility-slim/10.2.3)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/mermaid/10.2.4/confidence-slim/10.2.3)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mermaid-js/mermaid (mermaid)</summary>

###
[`v10.2.4`](https://togithub.com/mermaid-js/mermaid/releases/tag/v10.2.4):
10.2.4

[Compare
Source](https://togithub.com/mermaid-js/mermaid/compare/v10.2.3...v10.2.4)

#### Features

- Add Plausible analytics to mermaid.js.org by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[mermaid-js/mermaid#4473
- Support for development in Docker by
[@&#8203;nirname](https://togithub.com/nirname) in
[mermaid-js/mermaid#4478
- standardize info diagram definitions by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4486
- Change C4 stereotype braces from ASCII <\</>> to Unicode «/» by
[@&#8203;jonathan-r-young](https://togithub.com/jonathan-r-young) in
[mermaid-js/mermaid#4460
- Add coverage for E2E tests by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[mermaid-js/mermaid#4498
- set normal mode for vitest coverage by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4505
- Use v8 coverage in vitest by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[mermaid-js/mermaid#4560
- feat(flowchart): add classDef style group definition by
[@&#8203;tomperr](https://togithub.com/tomperr) in
[mermaid-js/mermaid#3923
- add cypress coverage clean by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4556
- fix(class): keep members in namespace classes by
[@&#8203;tomperr](https://togithub.com/tomperr) in
[mermaid-js/mermaid#4532

#### Bugfixes

- Add hint on "flowchart" and "graph" by
[@&#8203;koppor](https://togithub.com/koppor) in
[mermaid-js/mermaid#4096
- fix(flowchart): apply style on doublecircle by
[@&#8203;tomperr](https://togithub.com/tomperr) in
[mermaid-js/mermaid#4540
- fix not rendered style when style is optional by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4528
- fix(flowchart): allow multiple vertices with style by
[@&#8203;tomperr](https://togithub.com/tomperr) in
[mermaid-js/mermaid#4553

#### Documentation

- change REAMDME.md coverage from coveralls into codecov by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4507
- Update latest news section by
[@&#8203;huynhicode](https://togithub.com/huynhicode) in
[mermaid-js/mermaid#4468
- Fix link to Tutorials from n00b-overview page by
[@&#8203;Spiderpig86](https://togithub.com/Spiderpig86) in
[mermaid-js/mermaid#4472
- Fix Directives Documentation by
[@&#8203;adamazing](https://togithub.com/adamazing) in
[mermaid-js/mermaid#4475
- Correct "Bronze" spelling in timeline docs by
[@&#8203;adamazing](https://togithub.com/adamazing) in
[mermaid-js/mermaid#4467
- Document recommended file extension and MIME type docs by
[@&#8203;bollwyvl](https://togithub.com/bollwyvl) in
[mermaid-js/mermaid#4485
- Fix typo in quadrant chart documentation by
[@&#8203;tobie](https://togithub.com/tobie) in
[mermaid-js/mermaid#4512
- fix cspell issues in \*.md files by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4531
- docs: Howto on foreground color on timelines by
[@&#8203;mcbeelen](https://togithub.com/mcbeelen) in
[mermaid-js/mermaid#4524
- Add citation.cff file by
[@&#8203;schackartk](https://togithub.com/schackartk) in
[mermaid-js/mermaid#4521
- Update Tutorials.md by
[@&#8203;ellenealds](https://togithub.com/ellenealds) in
[mermaid-js/mermaid#4539
- Add Standard Notes extension in integrations page by
[@&#8203;nienow](https://togithub.com/nienow) in
[mermaid-js/mermaid#4557
- Fix up Gantt Chart demo by
[@&#8203;AlexMooney](https://togithub.com/AlexMooney) in
[mermaid-js/mermaid#4561

#### Chore

- Update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4482
- chore: revise Contributing documentation by
[@&#8203;weedySeaDragon](https://togithub.com/weedySeaDragon) in
[mermaid-js/mermaid#3814
- chore(deps): update all minor dependencies (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4435
- fix(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4510
- fix(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4535
- chore(deps): update dependency eslint-plugin-jsdoc to v46 by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4544
- chore(deps): update dependency jsdom to v22 by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4546
- chore(deps): update dependency eslint-plugin-unicorn to v47 by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4545
- chore(deps): update dependency workbox-window to v7 by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4547
- chore(deps): update node.js to v20 by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4548
- fix(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4543
- add `Suggested Solutions` field in `bug_report.yml` by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4541

#### New Contributors

- [@&#8203;Spiderpig86](https://togithub.com/Spiderpig86) made their
first contribution in
[mermaid-js/mermaid#4472
- [@&#8203;adamazing](https://togithub.com/adamazing) made their first
contribution in
[mermaid-js/mermaid#4475
- [@&#8203;koppor](https://togithub.com/koppor) made their first
contribution in
[mermaid-js/mermaid#4096
- [@&#8203;nirname](https://togithub.com/nirname) made their first
contribution in
[mermaid-js/mermaid#4478
- [@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) made their first
contribution in
[mermaid-js/mermaid#4486
- [@&#8203;jonathan-r-young](https://togithub.com/jonathan-r-young) made
their first contribution in
[mermaid-js/mermaid#4460
- [@&#8203;tobie](https://togithub.com/tobie) made their first
contribution in
[mermaid-js/mermaid#4512
- [@&#8203;schackartk](https://togithub.com/schackartk) made their first
contribution in
[mermaid-js/mermaid#4521
- [@&#8203;mcbeelen](https://togithub.com/mcbeelen) made their first
contribution in
[mermaid-js/mermaid#4524
- [@&#8203;ellenealds](https://togithub.com/ellenealds) made their first
contribution in
[mermaid-js/mermaid#4539
- [@&#8203;nienow](https://togithub.com/nienow) made their first
contribution in
[mermaid-js/mermaid#4557
- [@&#8203;AlexMooney](https://togithub.com/AlexMooney) made their first
contribution in
[mermaid-js/mermaid#4561

**Full Changelog**:
mermaid-js/mermaid@v10.2.3...v10.2.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/levaintech/contented).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDQuMiIsInVwZGF0ZWRJblZlciI6IjM1LjE0NC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

Recent commit to develop causes demo charts to render without styles
3 participants