1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-21 13:38:56 +02:00

Merge branch 'main' into assignee-not-visible-in-dark-mode

This commit is contained in:
Mattermost Build 2023-05-01 20:19:04 +03:00 committed by GitHub
commit a550108891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 17 deletions

View File

@ -1,7 +1,7 @@
# Announcement
# :warning: Announcement: PLEASE READ :warning:
Focalboard Personal Server and Personal Desktop editions will transition to being fully community supported as of **April 30th, 2023**. This Focalboard repository will become the Personal Edition repository, and will remain open indefinitely. However, we won’t be adding any new enhancements, and will only address Sev-1 level bugs until April 30th, 2023.
The Boards plugin version will be integrated into Mattermost as a core in-product feature, and will no longer be supported as a plugin as of release v7.11 (May 2023). The plugin code will be merged into the [Mattermost-server repository](https://github.com/mattermost/mattermost-server) where future enhancements will be added to moving forward.
The Boards plugin version will be integrated into Mattermost as a core in-product feature, and will no longer be supported as a plugin as of release v7.11 (May 2023). The plugin code will be merged into the [Mattermost-server repository](https://github.com/mattermost/mattermost-server) where future enhancements will be added to moving forward. New pull requests and issues should be filed against https://github.com/mattermost/mattermost-server.
Please see [this dicussion](https://github.com/mattermost/focalboard/discussions/4645) for more details.

View File

@ -123,6 +123,13 @@ func (s *SQLStore) isSchemaMigrationNeeded() (bool, error) {
"TABLE_NAME": s.tablePrefix + "schema_migrations",
})
switch s.dbType {
case model.MysqlDBType:
query = query.Where(sq.Eq{"TABLE_SCHEMA": s.schemaName})
case model.PostgresDBType:
query = query.Where("table_schema = current_schema()")
}
rows, err := query.Query()
if err != nil {
s.logger.Error("failed to fetch columns in schema_migrations table", mlog.Err(err))

View File

@ -203,7 +203,7 @@ const Kanban = (props: Props) => {
await Promise.all(awaits)
await mutator.changeViewCardOrder(props.board.id, activeView.id, activeView.fields.cardOrder, cardOrder, description)
})
}, [cards.map((o) => o.id).join(','), activeView.id, activeView.fields.cardOrder, groupByProperty, props.selectedCardIds])
}, [cards, activeView.id, activeView.fields.cardOrder, groupByProperty, props.selectedCardIds])
const [showCalculationsMenu, setShowCalculationsMenu] = useState<Map<string, boolean>>(new Map<string, boolean>())
const toggleOptions = (templateId: string, show: boolean) => {

View File

@ -4,7 +4,6 @@
import {useAppSelector} from '../store/hooks'
import {getMyBoardMembership, getCurrentBoardId, getBoard} from '../store/boards'
import {getCurrentTeam} from '../store/teams'
import {Utils} from '../utils'
import {Permission} from '../constants'
import {MemberRole} from '../blocks/board'
@ -24,10 +23,6 @@ export const useHasPermissions = (teamId: string, boardId: string, permissions:
return false
}
if (!Utils.isFocalboardPlugin()) {
return true
}
const adminPermissions = [Permission.ManageBoardType, Permission.DeleteBoard, Permission.ShareBoard, Permission.ManageBoardRoles, Permission.DeleteOthersComments]
const editorPermissions = [Permission.ManageBoardCards, Permission.ManageBoardProperties]
const commenterPermissions = [Permission.CommentBoardCards]

View File

@ -127,6 +127,8 @@ class WSClient {
onUnfollowBlock: FollowChangeHandler = () => {}
private notificationDelay = 100
private reopenDelay = 3000
private reopenRetryCount = 0
private reopenMaxRetries = 10
private updatedData: UpdatedData = {Blocks: [], Categories: [], BoardCategories: [], Boards: [], BoardMembers: [], CategoryOrder: []}
private updateTimeout?: NodeJS.Timeout
private errorPollId?: NodeJS.Timeout
@ -400,6 +402,7 @@ class WSClient {
ws.onopen = () => {
Utils.log('WSClient webSocket opened.')
this.state = 'open'
this.reopenRetryCount = 0
// if has a token defined when connecting, authenticate
if (this.token) {
@ -426,19 +429,25 @@ class WSClient {
Utils.log(`WSClient websocket onclose, code: ${e.code}, reason: ${e.reason}`)
if (ws === this.ws) {
// Unexpected close, re-open
Utils.logError('Unexpected close, re-opening websocket')
Utils.logError('Unexpected WSClient close')
for (const handler of this.onStateChange) {
handler(this, 'close')
}
this.state = 'close'
setTimeout(() => {
// ToDo: assert that this actually runs the onopen
// contents (auth + this.subscribe())
this.open()
for (const handler of this.onReconnect) {
handler(this)
}
}, this.reopenDelay)
if (this.reopenRetryCount < this.reopenMaxRetries) {
setTimeout(() => {
this.reopenRetryCount++
Utils.log(`Reopening websocket connection, count: ${this.reopenRetryCount}`)
this.open()
for (const handler of this.onReconnect) {
handler(this)
}
}, this.reopenDelay)
} else {
Utils.logError('Reached max websocket re-opening attempts')
}
}
}