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

Add "View Code" button and panel in chat #1102

Merged
merged 19 commits into from
Mar 25, 2024
Merged

Conversation

burieberry
Copy link
Contributor

@burieberry burieberry commented Mar 19, 2024

  • passing down monacoSDK from panel to room-message so as to load it only once
  • monaco editor is in readonly mode
  • it seems like the only situation where this button and panel would appear is when a json change is suggested by ai-bot, so I set the editor language to json
view-code short-content long-content expanded

Copy link

github-actions bot commented Mar 19, 2024

Test Results

537 tests  +1   533 ✔️ +1   7m 57s ⏱️ -7s
    1 suites ±0       4 💤 ±0 
    1 files   ±0       0 ±0 

Results for commit 0d3b968. ± Comparison against base commit 4a7bec2.

This pull request removes 536 and adds 537 tests. Note that renamed tests count towards both.
Chrome 122.0 ‑ Acceptance | Freestyle: smoke check
Chrome 122.0 ‑ Acceptance | basic tests: glimmer-scoped-css smoke test
Chrome 122.0 ‑ Acceptance | basic tests: visiting realm root
Chrome 122.0 ‑ Acceptance | code submode tests: Clicking card in search panel opens card JSON in editor
Chrome 122.0 ‑ Acceptance | code submode tests: can handle error when user puts unidentified domain in card URL bar
Chrome 122.0 ‑ Acceptance | code submode tests: card preview live updates when index changes
Chrome 122.0 ‑ Acceptance | code submode tests: card preview will show in the 3rd column when submode is set to code
Chrome 122.0 ‑ Acceptance | code submode tests: card-catalog does not offer to "create new card" when editing linked fields in code mode
Chrome 122.0 ‑ Acceptance | code submode tests: changes cursor position when selected module declaration is changed
Chrome 122.0 ‑ Acceptance | code submode tests: changes selected module declaration when cursor position is changed
…
Chrome 123.0 ‑ Acceptance | Freestyle: smoke check
Chrome 123.0 ‑ Acceptance | basic tests: glimmer-scoped-css smoke test
Chrome 123.0 ‑ Acceptance | basic tests: visiting realm root
Chrome 123.0 ‑ Acceptance | code submode tests: Clicking card in search panel opens card JSON in editor
Chrome 123.0 ‑ Acceptance | code submode tests: can handle error when user puts unidentified domain in card URL bar
Chrome 123.0 ‑ Acceptance | code submode tests: card preview live updates when index changes
Chrome 123.0 ‑ Acceptance | code submode tests: card preview will show in the 3rd column when submode is set to code
Chrome 123.0 ‑ Acceptance | code submode tests: card-catalog does not offer to "create new card" when editing linked fields in code mode
Chrome 123.0 ‑ Acceptance | code submode tests: changes cursor position when selected module declaration is changed
Chrome 123.0 ‑ Acceptance | code submode tests: changes selected module declaration when cursor position is changed
…
This pull request removes 4 skipped tests and adds 4 skipped tests. Note that renamed tests count towards both.
Chrome 122.0 ‑ Integration | card-editor: can create a specialized a new card to populate a linksTo field
Chrome 122.0 ‑ Integration | operator-mode: can create a specialized a new card to populate a linksTo field
Chrome 122.0 ‑ Integration | operator-mode: can create a specialized a new card to populate a linksToMany field
Chrome 122.0 ‑ Integration | search-index > query: can filter on an array of primitive fields inside a containsMany using 'eq'
Chrome 123.0 ‑ Integration | card-editor: can create a specialized a new card to populate a linksTo field
Chrome 123.0 ‑ Integration | operator-mode: can create a specialized a new card to populate a linksTo field
Chrome 123.0 ‑ Integration | operator-mode: can create a specialized a new card to populate a linksToMany field
Chrome 123.0 ‑ Integration | search-index > query: can filter on an array of primitive fields inside a containsMany using 'eq'

♻️ This comment has been updated with latest results.

@burieberry burieberry marked this pull request as ready for review March 21, 2024 22:32
@burieberry burieberry requested a review from a team March 22, 2024 13:43
@backspace
Copy link
Contributor

I don’t understand the exact triggers but I found when I initially pressed the button the container had the code out of view:

screencast 2024-03-22 11-11-02

But then when I hid it and showed it again it was in view! It seems to me one shouldn’t have to scroll after choosing to show the code.

Copy link
Contributor

@backspace backspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this locally and it works well, I’ll leave it up to you whether the scrolling situation I commented with is worth addressing.

@@ -86,6 +86,7 @@ export default class NewSession extends Component<Signature> {
padding: var(--boxel-sp-4xs);
font: 700 var(--boxel-font);
line-height: 1.5;
text-wrap: pretty;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t know about this, nice 🤩

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check the scroll. Yes I just found out about this property and liked it. However it may have caused the panel's right side alignment issue on percy, so I might revert this.

@burieberry burieberry merged commit 1c0ef4a into main Mar 25, 2024
18 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cs-6419-view-code-panel branch March 25, 2024 17:46
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.

2 participants