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

fix: update readme with pr labels to use, and reset page number #670

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has a
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.

## Pull request labels to use to trigger a release

Helpful reminders to future selves:

- Use the commit message conventions that trigger [semantic releases](https://semantic-release.gitbook.io/semantic-release/support/faq#how-can-i-change-the-type-of-commits-that-trigger-a-release)
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing or correcting existing tests
- chore: Do not use it for any source code changes, only use it when Changes to the build process or auxiliary tools and libraries such as documentation generation

## Setup & Development

<details><summary>STEPS</summary>
Expand Down Expand Up @@ -69,18 +83,22 @@ Build library using vite:
# pnpm
pnpm run vite
```

## `App.vue` and `mock.js`

### Local copy of `APP.vue` and `mock.js` in the `src` file

If you already have a local copy of be sure to save it locally because they will be deleted if you reclone this repo.
You can add a page to the [Wiki](https://github.com/UCLALibrary/ucla-library-website-components/wiki/) with your version.

### If starting this project from scratch

Be sure to add the `APP.vue` and `mock.js` in the `src` file

There are example files here: https://github.com/UCLALibrary/ucla-library-website-components/wiki/AppDotVueAndMockJS.md

#### If you get an error like this; you have forgotten to do this step:

(Add `APP.vue` and `mock.js` in the `src` file)

```
Expand All @@ -92,6 +110,7 @@ There are example files here: https://github.com/UCLALibrary/ucla-library-websit
| ^
8 | createApp(App).use(router).use(createPinia()).mount("#app");
```

```
src
> assets
Expand All @@ -118,6 +137,7 @@ src
**You have two choices**

### Update `package.json` in ftva-website-nuxt

**from**
`"ucla-library-website-components": "2.39.0-alpha.100"`
(whatever it is currently)
Expand Down
37 changes: 29 additions & 8 deletions src/lib-components/TabList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ function switchTab(tabName: string) {
router.push({
query: {
...route.query,
view: tabName.split(' ')[0].toLowerCase()
view: tabName.split(' ')[0].toLowerCase(),
page: 1
}
})

Expand Down Expand Up @@ -194,14 +195,26 @@ function animateTabGlider(elem: HTMLElement, hasInitialWidth: boolean) {
</script>

<template>
<div :class="[classes, alignment]" role="tabs">
<div
:class="[classes, alignment]"
role="tabs"
>
<!-- Slot: Dropdown Filters -->
<div v-if="$slots.filters" class="filters">
<div
v-if="$slots.filters"
class="filters"
>
<slot name="filters" />
</div>

<div class="tab-list-header" role="tablist">
<span ref="tabGliderRef" class="tab-glider" />
<div
class="tab-list-header"
role="tablist"
>
<span
ref="tabGliderRef"
class="tab-glider"
/>
<button
v-for="(tab, index) in tabItems"
:id="setTabId(tab?.title)"
Expand All @@ -217,15 +230,23 @@ function animateTabGlider(elem: HTMLElement, hasInitialWidth: boolean) {
@click="switchTab(tab?.title)"
>
<component
:is="iconMapping[tab.icon as keyof typeof iconMapping].icon" v-if="tab?.icon"
class="svg" aria-hidden="true"
:is="iconMapping[tab.icon as keyof typeof iconMapping].icon"
v-if="tab?.icon"
class="svg"
aria-hidden="true"
/>
{{ tab?.title }}
</button>
</div>
</div>
<!-- Slot: TabItem -->
<div :id="parsedAriaLabel" class="tab-list-body" role="tabpanel" :aria-labelledby="parsedAriaLabel" :hidden="!activeTabTitle">
<div
:id="parsedAriaLabel"
class="tab-list-body"
role="tabpanel"
:aria-labelledby="parsedAriaLabel"
:hidden="!activeTabTitle"
>
<slot />
</div>
</template>
Expand Down
Loading