From b9fe2d65426c6af56c1434815cb6042bb42e190b Mon Sep 17 00:00:00 2001 From: tronghieuvuong Date: Tue, 14 Nov 2023 12:51:24 -0800 Subject: [PATCH 1/2] Fix: Move pagination to the middle of the page. --- .../composable/classifyRelease.ts | 17 ------ apps/release-notes/composable/getreport.ts | 4 -- apps/release-notes/nuxt.config.ts | 29 +++++----- apps/release-notes/pages/index.vue | 12 ++--- .../public/BCID_V_rgb_pos_small.png | Bin 0 -> 26574 bytes apps/release-notes/public/favicon.ico | Bin 4286 -> 0 bytes .../tests/composables/home.test.ts | 51 ++++++++++++++++++ 7 files changed, 73 insertions(+), 40 deletions(-) create mode 100644 apps/release-notes/public/BCID_V_rgb_pos_small.png delete mode 100644 apps/release-notes/public/favicon.ico diff --git a/apps/release-notes/composable/classifyRelease.ts b/apps/release-notes/composable/classifyRelease.ts index 97c407a..edbc759 100644 --- a/apps/release-notes/composable/classifyRelease.ts +++ b/apps/release-notes/composable/classifyRelease.ts @@ -26,15 +26,11 @@ export async function classifyReleases ( } else if (team === 'NAMETEAMSPACE') { myGhIds = GhRepo.NAMETEAMSPACE } - console.log('Current state:' + state) const response = await getReport(myGhIds, startCursor, endCursor, state) items = response.nodes pageInfo = response.pageInfo const itemArray = Array.isArray(items) ? items : [] - console.log(itemArray) const releases = filterResponse(itemArray) - console.log('in report') - console.log(releases) return { releases, pageInfo @@ -52,9 +48,7 @@ export function filterResponse (itemArray: any[]) { const releases: Release[] = [] for (let i = itemArray.length - 1; i > -1; i--) { const item = itemArray[i] - // console.log(item) const issues = getIssues(item.issues.nodes) - // if (item.state === 'CLOSED') { releases.push({ id: item.id, title: item.title, @@ -64,17 +58,6 @@ export function filterResponse (itemArray: any[]) { state: item.state, issues }) - // } else { - // releases.open.push({ - // id: item.id, - // title: item.title, - // description: item.description, - // startOn: item.startOn, - // endOn: item.endOn, - // state: item.state, - // issues - // }) - // } } return releases } diff --git a/apps/release-notes/composable/getreport.ts b/apps/release-notes/composable/getreport.ts index 5558b71..0440bc9 100644 --- a/apps/release-notes/composable/getreport.ts +++ b/apps/release-notes/composable/getreport.ts @@ -8,7 +8,6 @@ export async function getReport ( state: string ) { const client = getClient() - console.log(state, start, end) try { const result = await client.query({ query: gql` @@ -63,11 +62,8 @@ export async function getReport ( state } }) - console.log('in getReport') - console.log(result.data.workspace) return result.data.workspace.releases } catch (error) { - console.error(error) throw error } } diff --git a/apps/release-notes/nuxt.config.ts b/apps/release-notes/nuxt.config.ts index a30903d..b7e54d7 100644 --- a/apps/release-notes/nuxt.config.ts +++ b/apps/release-notes/nuxt.config.ts @@ -1,24 +1,29 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ devtools: { enabled: true }, - modules: ['@nuxtjs/tailwindcss'], + modules: ["@nuxtjs/tailwindcss"], tailwindcss: { - cssPath: '~/assets/css/tailwind.css', - configPath: 'tailwind.config' + cssPath: "~/assets/css/tailwind.css", + configPath: "tailwind.config", }, app: { head: { link: [ { - rel: 'stylesheet', - href: 'https://drive.google.com/file/d/18cwKBO0ZzLNQEnoqjEfC_6PCxqETDSqt/view?usp=sharing' - } - ] - } + rel: "stylesheet", + href: "https://drive.google.com/file/d/18cwKBO0ZzLNQEnoqjEfC_6PCxqETDSqt/view?usp=sharing", + }, + { + rel: "icon", + type: "image/png", + href: "/BCID_V_rgb_pos_small.png", + }, + ], + }, }, runtimeConfig: { public: { - zenhubAPI: process.env.ZENHUB_APIKEY - } - } -}) + zenhubAPI: process.env.ZENHUB_APIKEY, + }, + }, +}); diff --git a/apps/release-notes/pages/index.vue b/apps/release-notes/pages/index.vue index 68930e4..fd7d56f 100644 --- a/apps/release-notes/pages/index.vue +++ b/apps/release-notes/pages/index.vue @@ -50,8 +50,6 @@ export default { async created () { const response = await classifyReleases(this.board, this.pageInfo.startCursor, this.pageInfo.endCursor, this.state) this.releases = response.releases - console.log('Response') - console.log(this.releases) this.pageInfo = { hasPreviousPage: response.pageInfo.hasPreviousPage, hasNextPage: response.pageInfo.hasNextPage, @@ -115,9 +113,9 @@ export default {

All releases that are {{ statusDisplay }} are noted below.

-
+ Go to: -
+