Skip to content

Commit 5dab66a

Browse files
committed
changes for merge
2 parents f6ef4ed + 4294085 commit 5dab66a

27 files changed

Lines changed: 1123 additions & 515 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ Before opening a pull request, developer should:
1818
7. select the _Allow edits from maintainers_ option (see this [article](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) for more details).
1919

2020
After opening a pull request, developer:
21-
- should create a new small markdown log file using the PR number e.g. `1010_fix.md` or `1010_add.md` inside `draftlogs` folder as described in this [README](https://github.com/plotly/plotly.js/blob/master/draftlogs/README.md), commit it and push.
21+
- should create a new small markdown log file using the PR number e.g. `1010_fix.md` or `1010_add.md` inside `draftlogs` folder as described in this [README](https://github.com/plotly/plotly.js/blob/master/draftlogs/README.md), commit it and push. A CI check enforces this; PRs that don't warrant a CHANGELOG entry can opt out by applying the `no-draftlog` label.
2222
- should **not** force push (i.e. `git push -f`) to remote branches associated with opened pull requests. Force pushes make it hard for maintainers to keep track of updates. Therefore, if required, please fetch `upstream/master` and "merge" with master instead of "rebase".
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Check Draftlog
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review]
6+
7+
concurrency:
8+
group: check-draftlog-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
15+
jobs:
16+
check-draftlog:
17+
if: github.event.pull_request.draft == false
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check for no-draftlog label
21+
id: label-check
22+
env:
23+
PR_LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
24+
run: |
25+
set -euo pipefail
26+
if echo "$PR_LABELS" | grep -q '"no-draftlog"'; then
27+
echo "Skipping draftlog check: 'no-draftlog' label is set."
28+
echo "skip=true" >> "$GITHUB_OUTPUT"
29+
fi
30+
31+
- name: Check for a new draftlog entry
32+
if: steps.label-check.outputs.skip != 'true'
33+
env:
34+
GH_TOKEN: ${{ github.token }}
35+
REPO: ${{ github.repository }}
36+
PR_NUMBER: ${{ github.event.pull_request.number }}
37+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
38+
run: |
39+
set -euo pipefail
40+
41+
ADDED=$(gh api --paginate "/repos/$REPO/pulls/$PR_NUMBER/files" \
42+
--jq '.[] | select(.status=="added") | .filename' \
43+
| grep '^draftlogs/' | grep -v '^draftlogs/README\.md$' || true)
44+
45+
if [ -z "$ADDED" ]; then
46+
echo "::error::No new draftlog entry was added under draftlogs/."
47+
echo ""
48+
echo "Most PRs should add a markdown file under draftlogs/ for the next CHANGELOG."
49+
echo "See draftlogs/README.md for the filename convention."
50+
echo ""
51+
echo "If this PR genuinely does not need a changelog entry (e.g. CI-only,"
52+
echo "internal refactor, docs typo), add the 'no-draftlog' label to this PR."
53+
exit 1
54+
fi
55+
56+
INVALID_NAMES=$(echo "$ADDED" | grep -vE '^draftlogs/[0-9]+_(fix|add|remove|change|deprecate)\.md$' || true)
57+
if [ -n "$INVALID_NAMES" ]; then
58+
echo "::error::Invalid draftlog filename(s):"
59+
echo "$INVALID_NAMES" | sed 's/^/ - /'
60+
echo ""
61+
echo "Expected pattern: draftlogs/<number>_(fix|add|remove|change|deprecate).md"
62+
echo "See draftlogs/README.md for details."
63+
exit 1
64+
fi
65+
66+
MISSING_LINK=""
67+
while IFS= read -r f; do
68+
[ -z "$f" ] && continue
69+
content=$(gh api -H 'Accept: application/vnd.github.raw' "/repos/$REPO/contents/$f?ref=$HEAD_SHA")
70+
if ! echo "$content" | grep -qE '\[\[#[0-9]+\]\(https://github\.com/plotly/plotly\.js/pull/[0-9]+\)\]'; then
71+
MISSING_LINK="$MISSING_LINK$f"$'\n'
72+
fi
73+
done <<< "$ADDED"
74+
75+
if [ -n "$MISSING_LINK" ]; then
76+
echo "::error::Draftlog entry(ies) missing a PR link:"
77+
printf '%s' "$MISSING_LINK" | sed 's/^/ - /'
78+
echo ""
79+
echo "Each entry must include a link in the form:"
80+
echo " [[#1234](https://github.com/plotly/plotly.js/pull/1234)]"
81+
echo "See draftlogs/README.md for an example."
82+
exit 1
83+
fi
84+
85+
echo "Found new draftlog entry(ies):"
86+
echo "$ADDED" | sed 's/^/ - /'

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
7171
| `status: in progress` | PRs that required some initial feedback but not ready to merge |
7272
| `status: reviewable` | PRs that are completed from the author's perspective |
7373
| `status: on hold` | PRs that are put on hold |
74+
| `no-draftlog` | PR opted out of the [draftlog](./draftlogs/README.md) check |
7475

7576
## Development
7677

build/plotcss.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ var rules = {
5050
"X [data-title]:after": "content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;",
5151
"X .vertical [data-title]:before,X .vertical [data-title]:after": "top:0%;right:200%;",
5252
"X .vertical [data-title]:before": "border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",
53+
"X .plotly-cloud-dialog": "font-family:\"Open Sans\",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);",
54+
"X .plotly-cloud-dialog .plotly-cloud-dialog-box": "box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;",
55+
"X .plotly-cloud-dialog .plotly-cloud-dialog-title": "font-size:16px;font-weight:bold;margin-bottom:12px;",
56+
"X .plotly-cloud-dialog .plotly-cloud-dialog-message": "line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;",
57+
"X .plotly-cloud-dialog .plotly-cloud-dialog-buttons": "display:flex;justify-content:flex-end;margin-top:20px;",
58+
"X .plotly-cloud-dialog .plotly-cloud-dialog-btn": "font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;",
59+
"X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible": "outline:2px solid #447adb;outline-offset:1px;",
60+
"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel": "background-color:#fff;border-color:#e0e2e5;color:#777;",
61+
"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover": "background-color:#f3f3f3;",
62+
"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm": "background-color:#447adb;color:#fff;",
63+
"X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover": "background-color:#1d3b84;",
5364
Y: "font-family:\"Open Sans\",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;",
5465
"Y p": "margin:0;",
5566
"Y .notifier-note": "min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;",

draftlogs/7802_change.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Update `sendDataToCloud` modebar button to upload chart to Plotly Cloud [[#7802](https://github.com/plotly/plotly.js/pull/7802), [#7852](https://github.com/plotly/plotly.js/pull/7852)]
2+
- NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload.

draftlogs/7837_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix geo `fitbounds` to choose a compact longitude range when point data straddles the antimeridian [[#7837](https://github.com/plotly/plotly.js/pull/7837)], with thanks to @SharadhNaidu for the contribution!

draftlogs/7838_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Preserve XML structural entities during decode when exporting SVG [[#7838](https://github.com/plotly/plotly.js/pull/7838)]

draftlogs/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,15 @@ If your PR falls into more than one category - for example adding a new feature
1919
which would render
2020
- Add `icicle` trace type [[#5546](https://github.com/plotly/plotly.js/pull/5546)]
2121

22-
> Please start your single-line or multiple lined message with a verb. You could basically use the PR description while providing a link to the PR similar to the above example is appreciated too.
22+
> Please start your single-line or multiple lined message with a verb.
23+
24+
Each entry must include a link back to the PR in the form shown above:
25+
`[[#1234](https://github.com/plotly/plotly.js/pull/1234)]` (a link to
26+
`/issues/1234` is also accepted, since GitHub redirects between the two).
27+
28+
### Skipping the draftlog
29+
30+
A CI check enforces that every pull request adds a new file under
31+
`draftlogs/`. If your PR genuinely does not warrant a CHANGELOG entry
32+
(e.g. a CI-only change, internal refactor, or docs typo), add the
33+
`no-draftlog` label to the PR to opt out.

package-lock.json

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
"css-loader": "^7.1.2",
132132
"deep-equal": "^2.2.3",
133133
"ecstatic": "^4.1.4",
134-
"esbuild": "^0.25.5",
134+
"esbuild": "^0.28.1",
135135
"esbuild-plugin-environment": "^0.4.0",
136136
"esbuild-plugin-glsl": "^1.2.2",
137137
"esbuild-plugin-inline-css": "^0.0.1",

0 commit comments

Comments
 (0)