Skip to content

feat: new @scalar/api-reference-editor package #2091

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

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

geoffgscott
Copy link
Member

@geoffgscott geoffgscott commented Jun 14, 2024

Adds an editor package to the repo to enable spec editing with internal or external state.

Derived from: #1490

Also includes a fix to remove the npx call of @scalar/cli during build tooling which is dangerous.

@geoffgscott geoffgscott requested a review from marclave as a code owner June 14, 2024 16:18
Copy link

changeset-bot bot commented Jun 14, 2024

🦋 Changeset detected

Latest commit: 7c6b8bb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@scalar/use-codemirror Patch
@scalar/api-reference Patch
@scalar/client-app Patch
@scalar/components Patch
@scalar/use-toasts Patch
@scalar/nuxt Patch
@scalar/api-reference-editor Minor
@scalar/api-client Patch
@scalar/api-reference-react Patch
@scalar/cli Patch
@scalar/express-api-reference Patch
@scalar/fastify-api-reference Patch
@scalar/hono-api-reference Patch
@scalar/nestjs-api-reference Patch
@scalar/nextjs-api-reference Patch
@scalar/play-button Patch
@scalar/api-client-modal Patch
@scalar/api-client-react Patch
@scalar/docusaurus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@geoffgscott geoffgscott force-pushed the geoff/add-reference-editor branch from c2dcc21 to f39214e Compare June 14, 2024 16:28
Copy link

relativeci bot commented Jun 14, 2024

#2487 Bundle Size — 2.01MiB (+0.03%).

7c6b8bb(current) vs be899bf main#2486(baseline)

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#2487
     Baseline
#2486
Regression  Initial JS 2.01MiB(+0.03%) 2.01MiB
No change  Initial CSS 0B 0B
No change  Cache Invalidation 100% 100%
No change  Chunks 1 1
No change  Assets 1 1
Change  Modules 1238(+0.16%) 1236
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 158 158
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#2487
     Baseline
#2486
Regression  JS 2.01MiB (+0.03%) 2.01MiB

Bundle analysis reportBranch geoff/add-reference-editorProject dashboard

@hanspagel hanspagel changed the title feat: Adds api-reference-editor package feat: new api-reference-editor package Jun 17, 2024
@hanspagel hanspagel changed the title feat: new api-reference-editor package feat: new @scalar/api-reference-editor package Jun 17, 2024
@hanspagel hanspagel force-pushed the geoff/add-reference-editor branch from c1b9f61 to 4e6f03c Compare June 17, 2024 09:03
@hanspagel hanspagel force-pushed the geoff/add-reference-editor branch from ba56a91 to 7837170 Compare June 17, 2024 09:09
@hanspagel
Copy link
Member

hanspagel commented Jun 17, 2024

I’ve extracted the @scalar/galaxy build script changes to #2118, rebased the PR and added a changeset here. ✌️

@hanspagel hanspagel self-requested a review June 19, 2024 15:11
Copy link
Member

@marclave marclave left a comment

Choose a reason for hiding this comment

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

i get an error for [vite-node] [ERR_LOAD_URL] ./nuxt-theme.css on nuxt

also we should add some documentation to root README (even if just a link to the package readme) and remove our isEditable prop

<slot></slot>
</div>
</template>
<style>
Copy link
Member

Choose a reason for hiding this comment

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

lets scope this :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@@ -250,7 +250,19 @@ export type ReferenceLayoutSlot =
| 'sidebar-start'
| 'sidebar-end'

export type ReferenceLayoutSlots = {
[x in ReferenceLayoutSlot]: (props: ReferenceSlotProps) => any
Copy link
Member

Choose a reason for hiding this comment

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

do we need to specify any here? maybe a comment would help : )

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure this is previous code that was moved.

import ClassicLayout from './ClassicLayout.vue'
import ModernLayout from './ModernLayout.vue'

// eslint-disable-next-line vue/no-unused-properties
Copy link
Member

Choose a reason for hiding this comment

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

should we just pick the props we use from this?

Copy link
Member Author

Choose a reason for hiding this comment

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

No we are passing props through.

fix: Test removing scalar cli from galaxy

fix: Correct type errors

chore: restore galaxy build command

chore: reset version

docs(changeset): init

docs(changeset): chore: introduce the new @scalar/api-reference-editor

chore: update lock file

fix: scope css
@geoffgscott geoffgscott force-pushed the geoff/add-reference-editor branch from 07772e8 to 7c6b8bb Compare June 25, 2024 19:25
Copy link
Contributor

@marclave marclave self-requested a review June 25, 2024 19:31
@geoffgscott geoffgscott merged commit b981770 into main Jun 25, 2024
10 checks passed
@geoffgscott geoffgscott deleted the geoff/add-reference-editor branch June 25, 2024 19:57
@hanspagel hanspagel mentioned this pull request Jul 10, 2024
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.

3 participants