-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(sheets): refine chart data label controls #2504
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
Open
zhengzhijiej-tech
wants to merge
25
commits into
main
Choose a base branch
from
feat-chart-opt-special-types-cli
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e665b3e
fix(sheets): preserve chart axes and clarify label defaults
zhengzhijiej-tech 8e8e1b3
docs(sheets): refine chart display defaults
zhengzhijiej-tech fc7a9cc
feat(sheets): support per-series chart data labels
zhengzhijiej-tech c8f06cd
chore: release v1.0.90 (#2503)
lark-cli-external-pr-digest[bot] 85d07b3
Revert "feat(sheets): support per-series chart data labels"
zhengzhijiej-tech 0f95533
feat(im): add chat AppLink output (#2491)
xiaoxiangyu-123 d0158ab
fix(docs): recover PowerShell-dequoted presentation JSON (#2501)
ViperCai 971e639
feat(sheets): relax local-office token length check from 28 to >=25 (…
xiongyuanwen-byted 5e05574
fix(sheets): validate chart data sources in layout check
zhengzhijiej-tech cfadcc2
refactor(sheets): use sparse scatter markers for point labels
zhengzhijiej-tech 77041a9
Merge remote-tracking branch 'origin/feat-chart-opt-special-types-cli…
zhengzhijiej-tech 1c4f758
feat(calendar): add +join-event shortcut and share token support (#2508)
calendar-assistant 84f9414
feat(base): streamline record workflows (#2529)
zgz2048 82718bf
fix(sheets): preserve chart axes and clarify label defaults
zhengzhijiej-tech 3136895
docs(sheets): refine chart display defaults
zhengzhijiej-tech 77b0b99
feat(sheets): support per-series chart data labels
zhengzhijiej-tech 82a1e80
Revert "feat(sheets): support per-series chart data labels"
zhengzhijiej-tech 5202bca
refactor(sheets): use sparse scatter markers for point labels
zhengzhijiej-tech 4bf0e43
fix(sheets): validate chart data sources in layout check
zhengzhijiej-tech 6ee2d0d
Merge remote-tracking branch 'origin/feat-chart-opt-special-types-cli…
zhengzhijiej-tech b683224
fix(sheets): expose raw cell values for chart checks
zhengzhijiej-tech 8366f4e
feat(sheets): support aggregate categories flag
zhengzhijiej-tech 7d33b28
feat(sheets): add chart quality and size helpers
zhengzhijiej-tech 55427d7
fix(sheets): refine chart data label handling
zhengzhijiej-tech a55d21c
fix(sheets): refine chart sizing recommendations
zhengzhijiej-tech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| // Copyright (c) 2026 Lark Technologies Pte. Ltd. | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| package base | ||
|
|
||
| import ( | ||
| "reflect" | ||
| "strings" | ||
| "testing" | ||
|
|
||
| "github.com/larksuite/cli/internal/httpmock" | ||
| ) | ||
|
|
||
| func TestBaseRecordShareLinkCreateAcceptsSingularAndPluralRecordIDFlags(t *testing.T) { | ||
| factory, stdout, registry := newExecuteFactory(t) | ||
| stub := &httpmock.Stub{ | ||
| Method: "POST", | ||
| URL: "/open-apis/base/v3/bases/app_x/tables/tbl_x/records/share_links/batch", | ||
| Body: map[string]interface{}{ | ||
| "code": 0, | ||
| "data": map[string]interface{}{ | ||
| "record_share_links": map[string]interface{}{ | ||
| "rec_1": "https://example.com/rec_1", | ||
| "rec_2": "https://example.com/rec_2", | ||
| "rec_3": "https://example.com/rec_3", | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
| registry.Register(stub) | ||
|
|
||
| err := runShortcut(t, BaseRecordShareLinkCreate, []string{ | ||
| "+record-share-link-create", | ||
| "--base-token", "app_x", | ||
| "--table-id", "tbl_x", | ||
| "--record-id", "rec_1", | ||
| "--record-ids", "rec_2,rec_3", | ||
| }, factory, stdout) | ||
| if err != nil { | ||
| t.Fatalf("run shortcut: %v", err) | ||
| } | ||
|
|
||
| body := decodeCapturedJSONBody(t, stub) | ||
| want := []interface{}{"rec_1", "rec_2", "rec_3"} | ||
| if got := body["record_ids"]; !reflect.DeepEqual(got, want) { | ||
| t.Fatalf("record_ids = %#v, want %#v", got, want) | ||
| } | ||
| } | ||
|
|
||
| func TestBaseRecordShareLinkCreateHelpShowsRecordIDAndHidesRecordIDsAlias(t *testing.T) { | ||
| cmd := mountBaseShortcutFlags(t, BaseRecordShareLinkCreate, "+record-share-link-create") | ||
| usage := cmd.Flags().FlagUsages() | ||
| if !strings.Contains(usage, "--record-id strings") { | ||
| t.Fatalf("help does not show canonical --record-id flag:\n%s", usage) | ||
| } | ||
| if strings.Contains(usage, "--record-ids") { | ||
| t.Fatalf("help exposes hidden --record-ids alias:\n%s", usage) | ||
| } | ||
| if alias := cmd.Flags().Lookup("record-ids"); alias == nil || alias.Name != "record-id" { | ||
| t.Fatalf("Lookup(record-ids) = %#v, want canonical --record-id", alias) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| // Copyright (c) 2026 Lark Technologies Pte. Ltd. | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| package calendar | ||
|
|
||
| import ( | ||
| "context" | ||
| "strings" | ||
|
|
||
| "github.com/larksuite/cli/errs" | ||
| "github.com/larksuite/cli/shortcuts/common" | ||
| ) | ||
|
|
||
| // joinEventPath is the unified "join by share token" endpoint. Every share | ||
| // form (link, QR code, share card, RSVP card) collapses to a single opaque | ||
| // share_token here; there is deliberately no "join by event_id" path, so the | ||
| // caller can never forge a plaintext event id to join an arbitrary event. | ||
| const joinEventPath = "/open-apis/calendar/v4/calendars/join_event" | ||
|
|
||
| var CalendarJoinEvent = common.Shortcut{ | ||
| Service: "calendar", | ||
| Command: "+join-event", | ||
| Description: "Join a calendar event via a share token (from a share link/QR code or a im share/RSVP card)", | ||
| Risk: "write", | ||
| Scopes: []string{"calendar:calendar.event:join"}, | ||
| AuthTypes: []string{"user", "bot"}, | ||
| Flags: []common.Flag{ | ||
| { | ||
| Name: "token", | ||
| Aliases: []string{"share-token"}, | ||
| Desc: "share token from a share link/QR code or an IM share/RSVP card", | ||
| Required: true, | ||
| }, | ||
| }, | ||
| DryRun: func(ctx context.Context, runtime *common.RuntimeContext) *common.DryRunAPI { | ||
| token := strings.TrimSpace(runtime.Str("token")) | ||
| return common.NewDryRunAPI(). | ||
| POST(joinEventPath). | ||
| Body(map[string]any{"share_token": token}) | ||
| }, | ||
| Validate: func(ctx context.Context, runtime *common.RuntimeContext) error { | ||
| if err := rejectCalendarAutoBotFallback(runtime); err != nil { | ||
| return err | ||
| } | ||
| token := strings.TrimSpace(runtime.Str("token")) | ||
| if token == "" { | ||
| return errs.NewValidationError(errs.SubtypeInvalidArgument, "share token cannot be empty").WithParam("--token") | ||
| } | ||
| if err := common.RejectDangerousCharsTyped("--token", token); err != nil { | ||
| return err | ||
| } | ||
| return nil | ||
| }, | ||
| Execute: func(ctx context.Context, runtime *common.RuntimeContext) error { | ||
| token := strings.TrimSpace(runtime.Str("token")) | ||
|
|
||
| _, err := runtime.CallAPITyped("POST", joinEventPath, nil, | ||
| map[string]any{"share_token": token}) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
|
||
| // The API returns an empty body on success; echo the join outcome so | ||
| // the JSON contract stays a self-describing object rather than a bare ack. | ||
| runtime.Out(map[string]any{ | ||
| "joined": true, | ||
| }, nil) | ||
| return nil | ||
| }, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use a hyphen in the compound modifier.
Change
auto analysis settingtoauto-analysis setting.Proposed edit
📝 Committable suggestion
🧰 Tools
🪛 LanguageTool
[grammar] ~24-~24: Use a hyphen to join words.
Context: ... (
#2460) - base: hide dashboard auto analysis setting (#2465) - slides: s...(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Source: Linters/SAST tools