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

Aside bar not functioning with DividePage #2

Closed
gkarmas opened this issue Sep 12, 2023 · 3 comments · Fixed by #4
Closed

Aside bar not functioning with DividePage #2

gkarmas opened this issue Sep 12, 2023 · 3 comments · Fixed by #4
Assignees
Labels
bug Something isn't working

Comments

@gkarmas
Copy link

gkarmas commented Sep 12, 2023

Aside bar not scrolling along with headings as soon as I used DividePage in the .md file.

Demo site

.md example:

---
layout: pon
aside: left
---

<script setup>import {DividePage} from 'vitepress-theme-api';</script>
<style>@import './node_modules/vitepress-theme-api/dist/style.css';</style>

# GraphQL API Guide

[GraphQL](https://graphql.org/) is a query language for APIs that offers an efficient and versatile alternative to REST APIs.


## Benefits of Using GraphQL Over REST:

1. **Single Endpoint:** GraphQL employs a single endpoint for all queries and mutations, contrasting with REST which necessitates multiple endpoints.

2. **Streamlined Data Retrieval:** With GraphQL, there's no need for intermediary datastores or additional layers when collating related data.

3. **Precise Data Retrieval:** Clients dictate the exact data they need, ensuring swift and succinct responses.

4. **HTTP-Based:** GraphQL, despite its unique query language, operates via standard HTTP, meaning any client capable of HTTP requests can interface with a GraphQL server. No GraphQL specific libraries are needed.

<DividePage>
<template #left>

## Authentication

Use the `Authorization` HTTP header with your personal access token.

</template>
<template #right>

**Header:**

Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN

</template>
</DividePage>

<DividePage>
<template #left>

### Obtaining a Personal Access Token

[PLACEHOLDER: Instructions or link for token.]

</template>
<template #right>

</template>
</DividePage>

<DividePage>
<template #left>

## Filters

Filters empower you to fine-tune your GraphQL queries, allowing you to retrieve data based on specific conditions. This guide will showcase the usage of `DeviceFilter`, `TagFilter`, and `StringConditional` filters when querying devices in the provided schema.

### DeviceFilter

The `DeviceFilter` is specifically crafted for querying devices based on specific attributes such as type, label, status, and tags.

</template>
<template #right>

#### Filtering by Connection Status

To filter devices by their connection status, use the `status` attribute of `DeviceFilter` and choose a value from the `ConnectionStatus` enum.

graphql [GraphQL]
{
  myDevices(filter: { status: "GOOD" }) {
	content {
	  id
	  label
	  type
	}
  }
}

This query retrieves devices with a connection status of "GOOD".

#### Filtering by Label

To query devices based on their label, employ the `label` attribute in conjunction with `StringConditional`.

graphql [GraphQL]
{
  myDevices(filter: { label: { eq: "MyVehicle" } }) {
	content {
	  id
	  label
	  type
	}
  }
}

In this example, devices labeled "MyVehicle" are fetched.

</template>
</DividePage>
@ravut8
Copy link
Contributor

ravut8 commented Sep 15, 2023

Hi @gkarmas, thanks for letting us know. Will look into it and update you soon.

@ravut8 ravut8 added the bug Something isn't working label Sep 15, 2023
@kittisakLS kittisakLS linked a pull request Sep 18, 2023 that will close this issue
kittisakLS added a commit that referenced this issue Sep 18, 2023
* add plugin and utils

* remove plugin folder

* change package name

* change url name

* fixed wording

* fixed issue

* test

* fixed issue

* 🔖 0.1.1-0

* 🔖 0.1.1-1

* 🔖 0.1.1-2

* fixed version

* 🔖 0.1.3-0

* test lib

* test after prerelease

* Update .npmrc

remove unused rc

* Create pnpm-lock.yaml

merge

* fixed for merge

* [chore]: update gitignore for ignoring vitepress cache folder

---------

Co-authored-by: haroonth <kittisak.ma@logicspark.com>
@ravut8
Copy link
Contributor

ravut8 commented Sep 18, 2023

Hi @gkarmas, just want to let you know we have fixed the issue. I believe there was a css property that was affecting the logic to check active anchors. We have released a new npm version.

Also, if you have any other feedbacks or suggestions, please don't hesitate to reach out to us. Hope this helps!

@gkarmas
Copy link
Author

gkarmas commented Sep 18, 2023

Awesome work guys. Confirming it works now @ravut8 @kittisakLS thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants