Merge branch 'develop' into fix-icon-position
						commit
						b73227eaca
					
				
							
								
								
									
										116
									
								
								CHANGELOG.md
								
								
								
								
							
							
						
						
									
										116
									
								
								CHANGELOG.md
								
								
								
								
							|  | @ -1,3 +1,119 @@ | |||
| Changes in [3.13.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.13.0) (2021-02-03) | ||||
| ===================================================================================================== | ||||
| [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.13.0-rc.1...v3.13.0) | ||||
| 
 | ||||
|  * Upgrade to JS SDK 9.6.0 | ||||
|  * [Release] Fix flair height after accent changes | ||||
|    [\#5612](https://github.com/matrix-org/matrix-react-sdk/pull/5612) | ||||
|  * [Release] Iterate Social Logins work around edge cases and branding | ||||
|    [\#5610](https://github.com/matrix-org/matrix-react-sdk/pull/5610) | ||||
|  * [Release] Lock widget room ID when added | ||||
|    [\#5608](https://github.com/matrix-org/matrix-react-sdk/pull/5608) | ||||
|  * [Release] Better errors for SSO failures | ||||
|    [\#5606](https://github.com/matrix-org/matrix-react-sdk/pull/5606) | ||||
|  * [Release] Fix RoomView re-mounting breaking peeking | ||||
|    [\#5603](https://github.com/matrix-org/matrix-react-sdk/pull/5603) | ||||
| 
 | ||||
| Changes in [3.13.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.13.0-rc.1) (2021-01-29) | ||||
| =============================================================================================================== | ||||
| [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.12.1...v3.13.0-rc.1) | ||||
| 
 | ||||
|  * Upgrade to JS SDK 9.6.0-rc.1 | ||||
|  * Translations update from Weblate | ||||
|    [\#5597](https://github.com/matrix-org/matrix-react-sdk/pull/5597) | ||||
|  * Support managed hybrid widgets from config | ||||
|    [\#5596](https://github.com/matrix-org/matrix-react-sdk/pull/5596) | ||||
|  * Add managed hybrid call widgets when supported | ||||
|    [\#5594](https://github.com/matrix-org/matrix-react-sdk/pull/5594) | ||||
|  * Tweak mobile guide toast copy | ||||
|    [\#5595](https://github.com/matrix-org/matrix-react-sdk/pull/5595) | ||||
|  * Improve SSO auth flow | ||||
|    [\#5578](https://github.com/matrix-org/matrix-react-sdk/pull/5578) | ||||
|  * Add optional mobile guide toast | ||||
|    [\#5586](https://github.com/matrix-org/matrix-react-sdk/pull/5586) | ||||
|  * Fix invisible text after logging out in the dark theme | ||||
|    [\#5588](https://github.com/matrix-org/matrix-react-sdk/pull/5588) | ||||
|  * Fix escape for cancelling replies | ||||
|    [\#5591](https://github.com/matrix-org/matrix-react-sdk/pull/5591) | ||||
|  * Update widget-api to beta.12 | ||||
|    [\#5589](https://github.com/matrix-org/matrix-react-sdk/pull/5589) | ||||
|  * Add commands for DM conversion | ||||
|    [\#5540](https://github.com/matrix-org/matrix-react-sdk/pull/5540) | ||||
|  * Run a UI refresh over the OIDC Exchange confirmation dialog | ||||
|    [\#5580](https://github.com/matrix-org/matrix-react-sdk/pull/5580) | ||||
|  * Allow stickerpickers the legacy "visibility" capability | ||||
|    [\#5581](https://github.com/matrix-org/matrix-react-sdk/pull/5581) | ||||
|  * Hide local video if it is muted | ||||
|    [\#5529](https://github.com/matrix-org/matrix-react-sdk/pull/5529) | ||||
|  * Don't use name width in reply thread for IRC layout | ||||
|    [\#5518](https://github.com/matrix-org/matrix-react-sdk/pull/5518) | ||||
|  * Update code_style.md | ||||
|    [\#5554](https://github.com/matrix-org/matrix-react-sdk/pull/5554) | ||||
|  * Fix Czech capital letters like ŠČŘ... | ||||
|    [\#5569](https://github.com/matrix-org/matrix-react-sdk/pull/5569) | ||||
|  * Add optional search shortcut | ||||
|    [\#5548](https://github.com/matrix-org/matrix-react-sdk/pull/5548) | ||||
|  * Fix Sudden 'find a room' UI shows up when the only room moves to favourites | ||||
|    [\#5584](https://github.com/matrix-org/matrix-react-sdk/pull/5584) | ||||
|  * Increase PersistedElement's z-index | ||||
|    [\#5568](https://github.com/matrix-org/matrix-react-sdk/pull/5568) | ||||
|  * Remove check that prevents Jitsi widgets from being unpinned | ||||
|    [\#5582](https://github.com/matrix-org/matrix-react-sdk/pull/5582) | ||||
|  * Fix Jitsi widgets causing localized tile crashes | ||||
|    [\#5583](https://github.com/matrix-org/matrix-react-sdk/pull/5583) | ||||
|  * Log candidates for calls | ||||
|    [\#5573](https://github.com/matrix-org/matrix-react-sdk/pull/5573) | ||||
|  * Upgrade deps 2021-01 | ||||
|    [\#5579](https://github.com/matrix-org/matrix-react-sdk/pull/5579) | ||||
|  * Fix "Continuing without email" dialog bug | ||||
|    [\#5566](https://github.com/matrix-org/matrix-react-sdk/pull/5566) | ||||
|  * Require registration for verification actions | ||||
|    [\#5574](https://github.com/matrix-org/matrix-react-sdk/pull/5574) | ||||
|  * Don't play the hangup sound when the call is answered from elsewhere | ||||
|    [\#5572](https://github.com/matrix-org/matrix-react-sdk/pull/5572) | ||||
|  * Move to newer base image for end-to-end tests | ||||
|    [\#5570](https://github.com/matrix-org/matrix-react-sdk/pull/5570) | ||||
|  * Update widgets in the room upon join | ||||
|    [\#5564](https://github.com/matrix-org/matrix-react-sdk/pull/5564) | ||||
|  * Update AuxPanel and related buttons when widgets change or on reload | ||||
|    [\#5563](https://github.com/matrix-org/matrix-react-sdk/pull/5563) | ||||
|  * Add VoIP user mapper | ||||
|    [\#5560](https://github.com/matrix-org/matrix-react-sdk/pull/5560) | ||||
|  * Improve styling of SSO Buttons for multiple IdPs | ||||
|    [\#5558](https://github.com/matrix-org/matrix-react-sdk/pull/5558) | ||||
|  * Fixes for the general tab in the room dialog | ||||
|    [\#5522](https://github.com/matrix-org/matrix-react-sdk/pull/5522) | ||||
|  * fix issue 16226 to allow switching back to default HS. | ||||
|    [\#5561](https://github.com/matrix-org/matrix-react-sdk/pull/5561) | ||||
|  * Support room-defined widget layouts | ||||
|    [\#5553](https://github.com/matrix-org/matrix-react-sdk/pull/5553) | ||||
|  * Change a bunch of strings from Recovery Key/Phrase to Security Key/Phrase | ||||
|    [\#5533](https://github.com/matrix-org/matrix-react-sdk/pull/5533) | ||||
|  * Give a bigger target area to AppsDrawer vertical resizer | ||||
|    [\#5557](https://github.com/matrix-org/matrix-react-sdk/pull/5557) | ||||
|  * Fix minimized left panel avatar alignment | ||||
|    [\#5493](https://github.com/matrix-org/matrix-react-sdk/pull/5493) | ||||
|  * Ensure component index has been written before renaming | ||||
|    [\#5556](https://github.com/matrix-org/matrix-react-sdk/pull/5556) | ||||
|  * Fixed continue button while selecting home-server | ||||
|    [\#5552](https://github.com/matrix-org/matrix-react-sdk/pull/5552) | ||||
|  * Wire up MSC2931 widget navigation | ||||
|    [\#5527](https://github.com/matrix-org/matrix-react-sdk/pull/5527) | ||||
|  * Various fixes for Bridge Info page (MSC2346) | ||||
|    [\#5454](https://github.com/matrix-org/matrix-react-sdk/pull/5454) | ||||
|  * Use room-specific listeners for message preview and community prototype | ||||
|    [\#5547](https://github.com/matrix-org/matrix-react-sdk/pull/5547) | ||||
|  * Fix some misc. React warnings when viewing timeline | ||||
|    [\#5546](https://github.com/matrix-org/matrix-react-sdk/pull/5546) | ||||
|  * Use device storage for allowed widgets if account data not supported | ||||
|    [\#5544](https://github.com/matrix-org/matrix-react-sdk/pull/5544) | ||||
|  * Fix incoming call box on dark theme | ||||
|    [\#5542](https://github.com/matrix-org/matrix-react-sdk/pull/5542) | ||||
|  * Convert DMRoomMap to typescript | ||||
|    [\#5541](https://github.com/matrix-org/matrix-react-sdk/pull/5541) | ||||
|  * Add in-call dialpad for DTMF sending | ||||
|    [\#5532](https://github.com/matrix-org/matrix-react-sdk/pull/5532) | ||||
| 
 | ||||
| Changes in [3.12.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.12.1) (2021-01-26) | ||||
| ===================================================================================================== | ||||
| [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.12.0...v3.12.1) | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|   "name": "matrix-react-sdk", | ||||
|   "version": "3.12.1", | ||||
|   "version": "3.13.0", | ||||
|   "description": "SDK for matrix.org using React", | ||||
|   "author": "matrix.org", | ||||
|   "repository": { | ||||
|  |  | |||
|  | @ -83,7 +83,10 @@ limitations under the License. | |||
| } | ||||
| 
 | ||||
| .mx_InteractiveAuthEntryComponents_termsPolicy { | ||||
|     display: block; | ||||
|     display: flex; | ||||
|     flex-direction: row; | ||||
|     justify-content: start; | ||||
|     align-items: center; | ||||
| } | ||||
| 
 | ||||
| .mx_InteractiveAuthEntryComponents_passwordSection { | ||||
|  |  | |||
|  | @ -75,15 +75,28 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor { | |||
|             throw new Error("Does not appear to be a permalink"); | ||||
|         } | ||||
| 
 | ||||
|         const parts = fullUrl.substring(`${this._elementUrl}/#/`.length).split("/"); | ||||
|         return ElementPermalinkConstructor.parseLinkParts(parts); | ||||
|         const parts = fullUrl.substring(`${this._elementUrl}/#/`.length); | ||||
|         return ElementPermalinkConstructor.parseAppRoute(parts); | ||||
|     } | ||||
| 
 | ||||
|     static parseLinkParts(parts: string[]): PermalinkParts { | ||||
|     /** | ||||
|      * Parses an app route (`(user|room|group)/identifer`) to a Matrix entity | ||||
|      * (room, user, group). | ||||
|      * @param {string} route The app route | ||||
|      * @returns {PermalinkParts} | ||||
|      */ | ||||
|     static parseAppRoute(route: string): PermalinkParts { | ||||
|         const parts = route.split("/"); | ||||
| 
 | ||||
|         if (parts.length < 2) { // we're expecting an entity and an ID of some kind at least
 | ||||
|             throw new Error("URL is missing parts"); | ||||
|         } | ||||
| 
 | ||||
|         // Split optional query out of last part
 | ||||
|         const [lastPartMaybeWithQuery] = parts.splice(-1, 1); | ||||
|         const [lastPart, query = ""] = lastPartMaybeWithQuery.split("?"); | ||||
|         parts.push(lastPart); | ||||
| 
 | ||||
|         const entityType = parts[0]; | ||||
|         const entity = parts[1]; | ||||
|         if (entityType === 'user') { | ||||
|  | @ -93,20 +106,9 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor { | |||
|             // Probably a group, no further parsing needed.
 | ||||
|             return PermalinkParts.forGroup(entity); | ||||
|         } else if (entityType === 'room') { | ||||
|             if (parts.length === 2) { | ||||
|                 return PermalinkParts.forRoom(entity, []); | ||||
|             } | ||||
| 
 | ||||
|             // rejoin the rest because v3 events can have slashes (annoyingly)
 | ||||
|             const eventIdAndQuery = parts.length > 2 ? parts.slice(2).join('/') : ""; | ||||
|             const secondaryParts = eventIdAndQuery.split("?"); | ||||
| 
 | ||||
|             const eventId = secondaryParts[0]; | ||||
|             const query = secondaryParts.length > 1 ? secondaryParts[1] : ""; | ||||
| 
 | ||||
|             // TODO: Verify Element works with via args
 | ||||
|             const via = query.split("via=").filter(p => !!p); | ||||
| 
 | ||||
|             // Rejoin the rest because v3 events can have slashes (annoyingly)
 | ||||
|             const eventId = parts.length > 2 ? parts.slice(2).join('/') : ""; | ||||
|             const via = query.split(/&?via=/).filter(p => !!p); | ||||
|             return PermalinkParts.forEvent(entity, eventId, via); | ||||
|         } else { | ||||
|             throw new Error("Unknown entity type in permalink"); | ||||
|  |  | |||
|  | @ -414,8 +414,8 @@ export function parsePermalink(fullUrl: string): PermalinkParts { | |||
|  */ | ||||
| export function parseAppLocalLink(localLink: string): PermalinkParts { | ||||
|     try { | ||||
|         const segments = localLink.replace("#/", "").split("/"); | ||||
|         return ElementPermalinkConstructor.parseLinkParts(segments); | ||||
|         const segments = localLink.replace("#/", ""); | ||||
|         return ElementPermalinkConstructor.parseAppRoute(segments); | ||||
|     } catch (e) { | ||||
|         // Ignore failures
 | ||||
|     } | ||||
|  |  | |||
|  | @ -242,6 +242,38 @@ describe("<TextualBody />", () => { | |||
|                 'rel="noreferrer noopener">event link</a> with text</span>', | ||||
|             ); | ||||
|         }); | ||||
| 
 | ||||
|         it("pills appear for room links with vias", () => { | ||||
|             const ev = mkEvent({ | ||||
|                 type: "m.room.message", | ||||
|                 room: "room_id", | ||||
|                 user: "sender", | ||||
|                 content: { | ||||
|                     body: | ||||
|                         "A [room link](https://matrix.to/#/!ZxbRYPQXDXKGmDnJNg:example.com" + | ||||
|                         "?via=example.com&via=bob.com) with vias", | ||||
|                     msgtype: "m.text", | ||||
|                     format: "org.matrix.custom.html", | ||||
|                     formatted_body: | ||||
|                         "A <a href=\"https://matrix.to/#/!ZxbRYPQXDXKGmDnJNg:example.com" + | ||||
|                         "?via=example.com&via=bob.com\">room link</a> with vias", | ||||
|                 }, | ||||
|                 event: true, | ||||
|             }); | ||||
| 
 | ||||
|             const wrapper = mount(<TextualBody mxEvent={ev} />); | ||||
|             expect(wrapper.text()).toBe("A !ZxbRYPQXDXKGmDnJNg:example.com with vias"); | ||||
|             const content = wrapper.find(".mx_EventTile_body"); | ||||
|             expect(content.html()).toBe( | ||||
|                 '<span class="mx_EventTile_body markdown-body" dir="auto">' + | ||||
|                 'A <span><a class="mx_Pill mx_RoomPill" href="#/room/!ZxbRYPQXDXKGmDnJNg:example.com' + | ||||
|                 '?via=example.com&via=bob.com" ' + | ||||
|                 'title="!ZxbRYPQXDXKGmDnJNg:example.com"><img class="mx_BaseAvatar mx_BaseAvatar_image" ' + | ||||
|                 'src="mxc://avatar.url/room.png" ' + | ||||
|                 'style="width: 16px; height: 16px;" alt="" aria-hidden="true">' + | ||||
|                 '!ZxbRYPQXDXKGmDnJNg:example.com</a></span> with vias</span>', | ||||
|             ); | ||||
|         }); | ||||
|     }); | ||||
| 
 | ||||
|     it("renders url previews correctly", () => { | ||||
|  |  | |||
|  | @ -243,6 +243,7 @@ export function mkStubRoom(roomId = null) { | |||
|         on: jest.fn(), | ||||
|         removeListener: jest.fn(), | ||||
|         getDMInviter: jest.fn(), | ||||
|         getAvatarUrl: () => 'mxc://avatar.url/room.png', | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -5578,8 +5578,8 @@ mathml-tag-names@^2.1.3: | |||
|   integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== | ||||
| 
 | ||||
| "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": | ||||
|   version "9.5.1" | ||||
|   resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/7cfbd0da95edc66671e166aa83145b5e17ca76fc" | ||||
|   version "9.6.0" | ||||
|   resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/6ad3fb16b3813c717943f6bc8bca5a55fe325477" | ||||
|   dependencies: | ||||
|     "@babel/runtime" "^7.12.5" | ||||
|     another-json "^0.2.0" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Šimon Brandner
						Šimon Brandner