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

Feature/integration manager #1425

Merged
merged 46 commits into from
Jun 3, 2020
Merged

Feature/integration manager #1425

merged 46 commits into from
Jun 3, 2020

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented May 29, 2020

Handle #48 issue

ganfra added 30 commits May 5, 2020 13:05
… manage properly distinction between room and "admin" widgets.
@ganfra ganfra requested a review from bmarty May 29, 2020 17:22
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!
I have done a static review of the code, I'll do some test and report any found issue later.
Thanks!

CHANGES.md Outdated Show resolved Hide resolved
<im.vector.riotx.core.ui.views.JumpToReadMarkerView
android:id="@+id/jumpToReadMarkerView"

<FrameLayout
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a Vertical LinearLayout, to be able to display both children

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, design by Rok want the jump to be on top of the widget

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤮

vector/src/main/res/layout/fragment_room_widget.xml Outdated Show resolved Hide resolved
@ganfra ganfra requested a review from bmarty June 2, 2020 18:41
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, a few new remarks

<string name="integrations_ui_url" translatable="false">"https://scalar.vector.im/"</string>
<string name="integrations_rest_url" translatable="false">"https://scalar.vector.im/api"</string>
<string name="integrations_jitsi_widget_url" translatable="false">"https://scalar.vector.im/api/widgets/jitsi.html"</string>

<string-array name="integrations_widgets_urls" translatable="false">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it used?

<string name="notice_widget_removed">%1$s widget removed by %2$s</string>
<string name="notice_widget_removed_by_you">%1$s widget removed by you</string>
<string name="notice_widget_modified">%1$s widget modified by %2$s</string>
<string name="notice_widget_modified_by_you">%1$s widget modified by you</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update with "by_you" feature. For those wordings, are they copied from Riot-Web? I think "bob added widget X" will be more coherent with other notice string.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's copied from riot web, not sure we should change it...

sp.getString(R.string.event_formatter_widget_added, name, disambiguatedDisplayName)
if (previousWidgetContent?.isActive().orFalse()) {
if (event.isSentByCurrentUser()) {
sp.getString(R.string.notice_widget_modified_by_you, name, disambiguatedDisplayName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disambiguatedDisplayName is not needed here

}
} else {
if (event.isSentByCurrentUser()) {
sp.getString(R.string.notice_widget_added_by_you, name, disambiguatedDisplayName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same remark

sp.getString(R.string.event_formatter_widget_removed, name, disambiguatedDisplayName)
val name = previousWidgetContent?.getHumanName()
if (event.isSentByCurrentUser()) {
sp.getString(R.string.notice_widget_removed_by_you, name, disambiguatedDisplayName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same remark

<string name="event_formatter_widget_removed">%1$s removed by %2$s</string>
<string name="event_formatter_widget_added">%1$s widget added by %2$s</string>
<string name="event_formatter_widget_removed">%1$s widget removed by %2$s</string>
<string name="event_formatter_widget_modified">%1$s widget modified by %2$s</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated strings, already defined in the SDK?

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 small remarks

<string name="notice_widget_modified">%1$s widget modified by %2$s</string>
<string name="notice_widget_modified_by_you">%1$s widget modified by you</string>
<string name="notice_widget_added">%1$s added %2$s widget</string>
<string name="notice_widget_added_by_you">you added %1$s widget</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start with upper case please (3 times)

whiteListedUrls = if (matrixConfiguration.integrationWidgetUrls.isEmpty()) {
listOf(preferredConfig.restUrl)
} else {
matrixConfiguration.integrationWidgetUrls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not equivalent (no use of kind anymore)? Maybe it's ok, just wanted to mention it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make same logic than iOS and web

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!

@bmarty bmarty merged commit 55bd346 into develop Jun 3, 2020
@bmarty bmarty deleted the feature/integration_manager branch June 3, 2020 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants