Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Changes for Town Square read only on web small screen size. Overlay m… #1092

Conversation

csduarte
Copy link
Contributor

Summary

These changes when "ExperimentalTownSquareIsReadOnly": true. for TownSquare for small screen size:

  • hide the edit able elements in the overlay menu options.
  • hide Click here to add one. Header in the Info overlay.

They were missed on the original changes to:
Hide edit able elements for Town Square in Channel View.
bafea1d

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Ran make check-style to check for style errors (required for all pull requests)
  • Ran make test to ensure unit and component tests passed
  • Has UI changes
  • Includes text changes and localization file ([.../i18n/en.json] updates

via @dmeza

@dmeza dmeza force-pushed the fix_TownSquare_read_only_for_small_sizes branch from 5dc25c4 to e2002b7 Compare April 12, 2018 21:24
@dmeza
Copy link
Contributor

dmeza commented Apr 12, 2018

@jasonblais these are changes that were missed on the first pass:

screen shot 2018-04-12 at 2 32 57 pm

screen shot 2018-04-12 at 2 33 08 pm

@jasonblais jasonblais added 1: PM Review Requires review by a product manager Setup Old Test Server Triggers the creation of a test server labels Apr 13, 2018
@amyblais amyblais removed their assignment Apr 13, 2018
@jasonblais
Copy link
Contributor

@dmeza Three notes

1 - The "Add Members" option for channels now says to add one.
image
2 - Can we remove the ... for posts in mobile view when the menu has nothing? In the attached, if I click ... on the system message, a blank menu opens (since there are no options to display given they're all hidden)

image

3 - How do I get to this screen? I wasn't able to find it

image

@jasonblais jasonblais added the Awaiting Submitter Action Blocked on the author label Apr 13, 2018
@jasonblais jasonblais self-assigned this Apr 14, 2018
@dmeza dmeza force-pushed the fix_TownSquare_read_only_for_small_sizes branch 2 times, most recently from 7df1179 to aab1155 Compare April 16, 2018 12:02
@dmeza
Copy link
Contributor

dmeza commented Apr 16, 2018

@jasonblais rebased to lastes.
1 - is fixed
2 - is fixed. It seems it was an existing bug. It wasn't related to these changes.
3 - when "ExperimentalTownSquareIsReadOnly": true (with a license enabled). It should display like that on Town Square.
Fixed tests.

@jasonblais jasonblais removed Awaiting Submitter Action Blocked on the author Setup Old Test Server Triggers the creation of a test server labels Apr 16, 2018
@mattermost mattermost deleted a comment from mattermod Apr 16, 2018
@mattermost mattermost deleted a comment from mattermod Apr 16, 2018
@mattermost mattermost deleted a comment from mattermod Apr 16, 2018
@jasonblais jasonblais added the Setup Old Test Server Triggers the creation of a test server label Apr 16, 2018
Copy link
Contributor

@jasonblais jasonblais left a comment

Choose a reason for hiding this comment

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

Thank you!

@jasonblais jasonblais added 2: Dev Review Requires review by a core commiter and removed 1: PM Review Requires review by a product manager Setup Old Test Server Triggers the creation of a test server labels Apr 16, 2018
@mattermost mattermost deleted a comment from mattermod Apr 16, 2018
@mattermost mattermost deleted a comment from mattermod Apr 16, 2018
@mattermost mattermost deleted a comment from mattermod Apr 16, 2018
);

if (!ChannelStore.isDefault(channel)) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this shouldn't be inside this if statement or else you won't be able to leave a read only channel that isn't the town square (assuming we ever support those)

{link}{' '}
<FormattedMessage
id='navbar.addOne'
defaultMessage='to add one.'
Copy link
Member

Choose a reason for hiding this comment

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

Instead of concatenating the sentence, can you structure it like this so that the translator has more control over the sentence?

addOne = (
    <div>
        <FormattedMessage
            id='navbar.clickToAddHeader'
            defaultMessage='{clickHere} to add one.'
            values={{
                clickHere: link
            }}
        />
    </div>
);

</a>
);
addOne = (
<div>
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this div is necessary, but if you want to maintain the original spacing, you could use

addOne = (
    <React.Fragment>
        <br/>
        <FormattedMessage .../>
    </React.Fragment>
);

@dmeza dmeza force-pushed the fix_TownSquare_read_only_for_small_sizes branch from aab1155 to 9c079b5 Compare April 16, 2018 17:51
@dmeza
Copy link
Contributor

dmeza commented Apr 16, 2018

@hmhealey rebased to latest from master and made the changes requested.

<br/>
<FormattedMessage
id='navbar.clickToAddHeader'
defaultMessage='{link} to add one.'
Copy link
Member

Choose a reason for hiding this comment

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

The defaultMessage uses {link} instead of {clickHere}. Otherwise, it looks good

@dmeza dmeza force-pushed the fix_TownSquare_read_only_for_small_sizes branch from 9c079b5 to 0245282 Compare April 18, 2018 02:50
@dmeza
Copy link
Contributor

dmeza commented Apr 18, 2018

@hmhealey rebased and made the change.

@hmhealey hmhealey removed the 2: Dev Review Requires review by a core commiter label Apr 20, 2018
@hmhealey hmhealey merged commit c2ac94d into mattermost:master Apr 20, 2018
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Needed Requires documentation labels Apr 20, 2018
@lindalumitchell lindalumitchell added the Tests/Not Needed Does not require new release tests label Apr 27, 2018
@jasonblais jasonblais added Docs/Done Required documentation has been written and removed Docs/Needed Requires documentation labels May 9, 2018
dmeza pushed a commit to uber-archive/mattermost-webapp that referenced this pull request May 16, 2018
mattermost#1092)

* Changes for Town Square read only on web small screen size. Overlay menu options.

* fix bug that displays dot menu with empty option on small screen devices.
dmeza pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Jun 5, 2018
mattermost#1092)

* Changes for Town Square read only on web small screen size. Overlay menu options.

* fix bug that displays dot menu with empty option on small screen devices.
dmeza pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Jun 7, 2018
mattermost#1092)

* Changes for Town Square read only on web small screen size. Overlay menu options.

* fix bug that displays dot menu with empty option on small screen devices.
@dmeza dmeza deleted the fix_TownSquare_read_only_for_small_sizes branch December 7, 2018 18:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Not Needed Does not require a changelog entry Docs/Done Required documentation has been written Tests/Not Needed Does not require new release tests
Projects
None yet
7 participants