Merge branch 'master' into event-master

This commit is contained in:
Hannes Heine 2023-05-13 11:48:47 +02:00 committed by GitHub
commit 55f6badeaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 156 additions and 35 deletions

View File

@ -4,13 +4,49 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### [2.6.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.5.1...2.6.0)
- fix(other): docker-compose for rebranding deployment [`#6265`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6265)
- feat(webapp): default categories of group for posts in group [`#6259`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6259)
- refactor(webapp): make action radius select in group form a reusable component [`#6244`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6244)
- fix(webapp): show avatar for group members [`#6258`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6258)
- fix(webapp): fix search for 3 chars [`#6256`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6256)
- fix(backend): group posts cannot be pinned [`#6242`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6242)
- Bump metascraper-soundcloud from 5.33.5 to 5.34.2 in /backend [`#6213`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6213)
- refactor(other): refactor test workflows [`#6151`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6151)
- fix(other): deployment fix typo, update stage.ocelot.social reference [`#6230`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6230)
- fix(other): bump metascraper-url from 5.33.5 to 5.34.2 in /backend [`#6217`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6217)
- fix(other): workflow typo [`#6235`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6235)
- feat(other): publish stage.yunite.me hook [`#6234`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6234)
- fix(other): reduce kubernetes memory limits [`#6229`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6229)
- fix(other): deployment for branded image with custom names [`#6228`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6228)
- Bump node from 19.8.1-alpine3.17 to 19.9.0-alpine3.17 in /backend [`#6219`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6219)
- Bump node from 19.8.1-alpine3.17 to 19.9.0-alpine3.17 in /webapp [`#6220`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6220)
- feat(other): deployment pod resources [`#6132`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6132)
- Bump @babel/core from 7.12.17 to 7.21.4 in /webapp [`#6215`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6215)
- Bump jsonwebtoken from 8.5.1 to 9.0.0 in /webapp [`#6079`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6079)
- Bump jest from 29.4.2 to 29.5.0 in /webapp [`#6094`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6094)
- Bump babel-jest from 29.4.2 to 29.5.0 in /webapp [`#6095`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6095)
- Bump neode from 0.4.8 to 0.4.9 in /backend [`#6075`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6075)
- Bump node from 19.4.0-alpine3.17 to 19.8.1-alpine3.17 in /webapp [`#6155`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6155)
- Bump node from 19.4.0-alpine3.17 to 19.8.1-alpine3.17 in /backend [`#6156`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6156)
- Bump @babel/core from 7.9.0 to 7.21.4 [`#6200`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6200)
- Bump @babel/preset-env from 7.12.7 to 7.21.4 [`#6204`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6204)
- Bump expect from 25.3.0 to 29.5.0 [`#6098`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6098)
- separate test workflows [`3533a36`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/3533a36cdc811c0e1dae218fbc2184f7c4bc3951)
- get it working [`8df7d5d`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/8df7d5d265b0c5ba16f167a213631d765d2f985e)
- feat(webapp): group categories on posts [`3244f3f`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/3244f3f86d1e8c09e0fd49f43c49f0a3aa8b85ab)
#### [2.5.1](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.5.0...2.5.1) #### [2.5.1](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.5.0...2.5.1)
> 23 March 2023
- chore(other): release v2.5.1 fix filter menu width [`#6180`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6180)
- feat(webapp): add tooltips to all menu icons [`#6185`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6185) - feat(webapp): add tooltips to all menu icons [`#6185`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6185)
- fix(webapp): popup filter max-width [`#6177`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6177) - fix(webapp): popup filter max-width [`#6177`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6177)
- Add tooltip to header notifications menu [`28505a5`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/28505a5b181008ebcde6fa58b7a4a8459a492018) - Add tooltip to header notifications menu [`28505a5`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/28505a5b181008ebcde6fa58b7a4a8459a492018)
- Add tooltip to header avatar menu [`4c0469f`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/4c0469f61a3c2fae23e50c6a5a2a91b63fac149a) - Add tooltip to header avatar menu [`4c0469f`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/4c0469f61a3c2fae23e50c6a5a2a91b63fac149a)
- Add tooltip to locale switch menu [`26b90fc`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/26b90fce4704e537126fd15ad950ea04e14890ba) - Release v2.5.1 - fix filter menu width [`08def14`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/08def14cafef7816d8e43f1896430400bda9635d)
#### [2.5.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.4.0...2.5.0) #### [2.5.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.4.0...2.5.0)

View File

@ -1,6 +1,6 @@
{ {
"name": "ocelot-social-backend", "name": "ocelot-social-backend",
"version": "2.5.1", "version": "2.6.0",
"description": "GraphQL Backend for ocelot.social", "description": "GraphQL Backend for ocelot.social",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community", "author": "ocelot.social Community",

View File

@ -65,10 +65,10 @@ services:
backend: backend:
image: ocelotsocialnetwork/backend-branded:local-${CONFIGURATION} image: ocelotsocialnetwork/backend-branded:local-${CONFIGURATION}
container_name: backend container_name: backend-branded
build: build:
dockerfile: src/docker/backend.Dockerfile dockerfile: src/docker/backend.Dockerfile
target: branded-branded target: branded
context: . context: .
args: args:
- CONFIGURATION=$CONFIGURATION - CONFIGURATION=$CONFIGURATION
@ -143,7 +143,7 @@ services:
neo4j: neo4j:
image: ocelotsocialnetwork/neo4j-community:latest image: ocelotsocialnetwork/neo4j-community:latest
container_name: neo4j container_name: neo4j-branded
networks: networks:
- test-network - test-network
volumes: volumes:

View File

@ -1,6 +1,6 @@
{ {
"name": "ocelot-social", "name": "ocelot-social",
"version": "2.5.1", "version": "2.6.0",
"description": "Free and open source software program code available to run social networks.", "description": "Free and open source software program code available to run social networks.",
"author": "ocelot.social Community", "author": "ocelot.social Community",
"license": "MIT", "license": "MIT",

View File

@ -336,10 +336,12 @@ $ease-in-sharp: cubic-bezier(0.895, 0.03, 0.685, 0.22);
*/ */
$z-index-modal: 9999; $z-index-modal: 9999;
$z-index-overlay: 9000;
$z-index-dropdown: 8888; $z-index-dropdown: 8888;
$z-index-page-submenu: 2500; $z-index-page-submenu: 2500;
$z-index-page-header: 2000; $z-index-page-header: 2000;
$z-index-page-sidebar: 1500; $z-index-page-sidebar: 1500;
$z-index-sticky-float: 150;
$z-index-sticky: 100; $z-index-sticky: 100;
$z-index-post-teaser-link: 5; $z-index-post-teaser-link: 5;
$z-index-surface: 1; $z-index-surface: 1;

View File

@ -95,7 +95,7 @@ blockquote {
box-shadow: $box-shadow-base; box-shadow: $box-shadow-base;
position: fixed; position: fixed;
width: 100%; width: 100%;
z-index: 10; z-index: $z-index-page-submenu;
a { a {
outline: none; outline: none;
@ -131,7 +131,7 @@ hr {
left: 0; left: 0;
position: fixed; position: fixed;
background: rgba(0, 0, 0, 0.15); background: rgba(0, 0, 0, 0.15);
z-index: 99; z-index: $z-index-overlay;
pointer-events: none; pointer-events: none;
transition: opacity 150ms ease-out; transition: opacity 150ms ease-out;
transition-delay: 50ms; transition-delay: 50ms;

View File

@ -43,6 +43,14 @@ export default {
selectedCategoryIds: this.existingCategoryIds, selectedCategoryIds: this.existingCategoryIds,
} }
}, },
watch: {
existingCategoryIds() {
if (!this.selectedCategoryIds.length && this.existingCategoryIds.length) {
this.selectedCategoryIds = this.existingCategoryIds
this.$forceUpdate()
}
},
},
computed: { computed: {
selectedCount() { selectedCount() {
return this.selectedCategoryIds.length return this.selectedCategoryIds.length

View File

@ -177,6 +177,15 @@ export default {
groupName() { groupName() {
return this.group && this.group.name return this.group && this.group.name
}, },
groupCategories() {
return this.group && this.group.categories
},
},
watch: {
groupCategories() {
if (!this.formData.categoryIds.length && this.groupCategories)
this.formData.categoryIds = this.groupCategories.map((cat) => cat.id)
},
}, },
methods: { methods: {
submit() { submit() {

View File

@ -37,8 +37,6 @@
<ds-text class="select-label"> <ds-text class="select-label">
{{ $t('group.type') }} {{ $t('group.type') }}
</ds-text> </ds-text>
<!-- TODO: change it has to be implemented later -->
<!-- TODO: move 'ds-select' from style guide to main code and implement missing translation etc. functionality -->
<select <select
class="select ds-input appearance--auto" class="select ds-input appearance--auto"
name="groupType" name="groupType"
@ -94,21 +92,10 @@
<ds-text class="select-label"> <ds-text class="select-label">
{{ $t('group.actionRadius') }} {{ $t('group.actionRadius') }}
</ds-text> </ds-text>
<!-- TODO: move 'ds-select' from styleguide to main code and implement missing translation etc. functionality --> <action-radius-select
<select v-model="formData.actionRadius"
class="select ds-input appearance--auto" @change.native="changeActionRadius($event)"
name="actionRadius" />
:value="formData.actionRadius"
@change="changeActionRadius($event)"
>
<option
v-for="actionRadius in actionRadiusOptions"
:key="actionRadius"
:value="actionRadius"
>
{{ $t(`group.actionRadii.${actionRadius}`) }}
</option>
</select>
<ds-chip <ds-chip
size="base" size="base"
:color=" :color="
@ -123,6 +110,7 @@
</ds-chip> </ds-chip>
<!-- location --> <!-- location -->
<!-- TODO: move 'ds-select' from styleguide to main code and implement missing translation etc. functionality -->
<ds-select <ds-select
id="city" id="city"
:label="$t('settings.data.labelCity') + locationNameLabelAddOnOldName" :label="$t('settings.data.labelCity') + locationNameLabelAddOnOldName"
@ -187,6 +175,7 @@ import {
DESCRIPTION_WITHOUT_HTML_LENGTH_MIN, DESCRIPTION_WITHOUT_HTML_LENGTH_MIN,
} from '~/constants/groups.js' } from '~/constants/groups.js'
import Editor from '~/components/Editor/Editor' import Editor from '~/components/Editor/Editor'
import ActionRadiusSelect from '~/components/Select/ActionRadiusSelect'
import { queryLocations } from '~/graphql/location' import { queryLocations } from '~/graphql/location'
let timeout let timeout
@ -196,6 +185,7 @@ export default {
components: { components: {
CategoriesSelect, CategoriesSelect,
Editor, Editor,
ActionRadiusSelect,
}, },
props: { props: {
update: { update: {
@ -216,7 +206,6 @@ export default {
categoriesActive: this.$env.CATEGORIES_ACTIVE, categoriesActive: this.$env.CATEGORIES_ACTIVE,
disabled: false, disabled: false,
groupTypeOptions: ['public', 'closed', 'hidden'], groupTypeOptions: ['public', 'closed', 'hidden'],
actionRadiusOptions: ['regional', 'national', 'continental', 'global'],
loadingGeo: false, loadingGeo: false,
cities: [], cities: [],
formData: { formData: {
@ -327,10 +316,10 @@ export default {
return false return false
}, },
changeGroupType(event) { changeGroupType(event) {
this.formData.groupType = event.target.value this.$refs.groupForm.update('groupType', event.target.value)
}, },
changeActionRadius(event) { changeActionRadius(event) {
this.formData.actionRadius = event.target.value this.$refs.groupForm.update('actionRadius', event.target.value)
}, },
updateEditorDescription(value) { updateEditorDescription(value) {
this.$refs.groupForm.update('description', value) this.$refs.groupForm.update('description', value)

View File

@ -10,7 +10,7 @@
params: { id: scope.row.id, slug: scope.row.slug }, params: { id: scope.row.id, slug: scope.row.slug },
}" }"
> >
<ds-avatar online size="small" :name="scope.row.name"></ds-avatar> <profile-avatar :profile="scope.row" size="small" />
</nuxt-link> </nuxt-link>
</template> </template>
<template #name="scope"> <template #name="scope">
@ -80,9 +80,13 @@
</template> </template>
<script> <script>
import { changeGroupMemberRoleMutation, removeUserFromGroupMutation } from '~/graphql/groups.js' import { changeGroupMemberRoleMutation, removeUserFromGroupMutation } from '~/graphql/groups.js'
import ProfileAvatar from '~/components/_new/generic/ProfileAvatar/ProfileAvatar'
export default { export default {
name: 'GroupMember', name: 'GroupMember',
components: {
ProfileAvatar,
},
props: { props: {
groupId: { groupId: {
type: String, type: String,

View File

@ -0,0 +1,37 @@
import { shallowMount } from '@vue/test-utils'
import ActionRadiusSelect from './ActionRadiusSelect'
const localVue = global.localVue
const propsData = { value: 'regional' }
describe('ActionRadiusSelect.', () => {
let wrapper
let mocks
beforeEach(() => {
mocks = {
$t: jest.fn(),
}
})
describe('mount', () => {
const Wrapper = () => {
return shallowMount(ActionRadiusSelect, { propsData, mocks, localVue })
}
beforeEach(() => {
wrapper = Wrapper()
})
it('renders the select', () => {
expect(wrapper.findComponent(ActionRadiusSelect).exists()).toBe(true)
})
describe('when an option is selected', () => {
it('emits a change event with the new value', () => {
const select = wrapper.find('select')
select.trigger('change')
expect(wrapper.emitted().change[0]).toEqual(['regional'])
})
})
})
})

View File

@ -0,0 +1,33 @@
<template>
<select
class="select ds-input appearance--auto"
name="actionRadius"
:value="value"
@change="onActionRadiusChange"
>
<option v-for="actionRadius in actionRadiusOptions" :key="actionRadius" :value="actionRadius">
{{ $t(`group.actionRadii.${actionRadius}`) }}
</option>
</select>
</template>
<script>
export default {
name: 'ActionRadiusSelect',
props: {
value: {
required: true,
},
},
data() {
return {
actionRadiusOptions: ['regional', 'national', 'continental', 'global'],
}
},
methods: {
onActionRadiusChange(event) {
this.$emit('change', event.target.value)
},
},
}
</script>

View File

@ -207,6 +207,9 @@ export const groupMembersQuery = () => {
name name
slug slug
myRoleInGroup myRoleInGroup
avatar {
url
}
} }
} }
` `

View File

@ -1,6 +1,6 @@
{ {
"name": "@ocelot-social/maintenance", "name": "@ocelot-social/maintenance",
"version": "2.5.1", "version": "2.6.0",
"description": "Maintenance page for ocelot.social", "description": "Maintenance page for ocelot.social",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community", "author": "ocelot.social Community",

View File

@ -1,6 +1,6 @@
{ {
"name": "ocelot-social-webapp", "name": "ocelot-social-webapp",
"version": "2.5.1", "version": "2.6.0",
"description": "ocelot.social Frontend", "description": "ocelot.social Frontend",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community", "author": "ocelot.social Community",

View File

@ -318,7 +318,7 @@ export default {
height: 54px; height: 54px;
width: 54px; width: 54px;
font-size: 26px; font-size: 26px;
z-index: 100; z-index: $z-index-sticky-float;
position: fixed; position: fixed;
bottom: -5px; bottom: -5px;
left: 98vw; left: 98vw;
@ -330,7 +330,7 @@ export default {
height: 54px; height: 54px;
width: 54px; width: 54px;
font-size: 26px; font-size: 26px;
z-index: 100; z-index: $z-index-sticky-float;
position: fixed; position: fixed;
top: 80px; top: 80px;
box-shadow: $box-shadow-x-large; box-shadow: $box-shadow-x-large;
@ -344,7 +344,7 @@ export default {
.filterButtonMenu { .filterButtonMenu {
width: 95%; width: 95%;
position: fixed; position: fixed;
z-index: 6; z-index: $z-index-sticky;
margin-top: -35px; margin-top: -35px;
padding: 20px 10px 20px 10px; padding: 20px 10px 20px 10px;
background-color: #f5f4f6; background-color: #f5f4f6;
@ -361,6 +361,7 @@ export default {
max-height: 950px; max-height: 950px;
overflow: auto; overflow: auto;
padding-bottom: 0px; padding-bottom: 0px;
z-index: $z-index-page-submenu;
} }
@media screen and (min-height: 401px) { @media screen and (min-height: 401px) {
#my-filter { #my-filter {
@ -410,7 +411,6 @@ export default {
height: 44px; height: 44px;
width: 44px; width: 44px;
font-size: 23px; font-size: 23px;
z-index: 10;
} }
.ds-grid { .ds-grid {
padding-top: 1em; padding-top: 1em;