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

Hide Edit Accounts option from AdministratorControls #4006

Closed
rt4914 opened this issue Nov 22, 2021 · 17 comments · Fixed by #4204
Closed

Hide Edit Accounts option from AdministratorControls #4006

rt4914 opened this issue Nov 22, 2021 · 17 comments · Fixed by #4204
Assignees
Labels
good first issue This item is good for new contributors to make their pull request. Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@rt4914
Copy link
Contributor

rt4914 commented Nov 22, 2021

Hide Edit Accounts option from AdministratorControls as currently it is of no use.

Note: Do not remove it, just hide it. Add appropriate test case too.

@rt4914 rt4914 added this to the Beta MR1 milestone Nov 22, 2021
@rt4914 rt4914 added good first issue This item is good for new contributors to make their pull request. Priority: Essential This work item must be completed for its milestone. Type: Improvement labels Nov 22, 2021
@HIM7707
Copy link

HIM7707 commented Nov 22, 2021

@rt4914 can i work on this?

@rt4914
Copy link
Contributor Author

rt4914 commented Nov 24, 2021

@HIM7707 I have assigned you other issue. Can you work on that first? Thanks.

@JishnuGoyal
Copy link
Contributor

@rt4914 May I work on this?

@Rishavgupta12345
Copy link

please assign me this issue @bkaur-bkj

@HIM7707
Copy link

HIM7707 commented Nov 28, 2021 via email

@MihirShirgaonkar
Copy link

May i work on this issue ? Is anyone working on this issue

@bkaur-bkj
Copy link
Contributor

@rt4914 May I work on this?

@JishnuGoyal Assigned you this issue

@bkaur-bkj
Copy link
Contributor

please assign me this issue @bkaur-bkj

@Rishavgupta12345 you have other issues assigned to you presently, You can work on them first.

@bkaur-bkj
Copy link
Contributor

Hi Sir/ma'am, I am having a hard time setting up the oppia android project on system. Can you suggest me setup guide link for the same? I can't find it on github. Please let me know as soon as possible. Thanks & Regards

On Wed, 24 Nov 2021, 09:43 Rajat Talesra, @.***> wrote: @HIM7707 https://github.com/HIM7707 I have assigned you other issue. Can you work on that first? Thanks. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#4006 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS6XSBNY34XHJIHQT2GS77TUNRQ7DANCNFSM5IRERYMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@HIM7707 pls follow the instructions mentioned in oppia android wiki, if you still face any issue describe your problem and drop a msg on oppia android gitter chat where other contributors can help you along

@JishnuGoyal
Copy link
Contributor

@rt4914 Hello,
In order to solve this problem, I found two ways:

  1. From the AdministratorControlsViewModel , remove AdministratorControlsGeneralViewModel (by commenting it out) from the itemViewModelList. (working)
  2. Another way would be to change visibility to View.GONE for each XML file (default, land, sw600dpi) under admistrator_controls_general_view. (not implemented)

I feel the first method would be better as it involves less code changes and it actually removes the layout.
Which method would you advise me to go with?

@JishnuGoyal
Copy link
Contributor

In case I go with method (2) above,

  • In each XML file, constraint layout visibility will be changed to View.GONE.
  • But since views are added along with the view model of each corresponding option (for ex. general, profile management, etc) inside AdministorControlsFragmentPresenter , there is a blank space left even after changing visibilty to View.Gone as shown:
    image

So, I'm going with method (1).

  • In this, the entire view model (AdministratorControlsGeneralViewModel) is removed from the itemViewModelList.
  • Hence, some modifications in the previously written tests have been made to account for the removed views.

@rt4914
Copy link
Contributor Author

rt4914 commented Dec 8, 2021

@JishnuGoyal Yes, first one is correct. Also you can make communication a bit faster by just creating a PR and assign it to your mentor for review. Thanks.

@BenHenning BenHenning modified the milestones: Beta MR1, Alpha MR5 Jul 18, 2022
BenHenning pushed a commit that referenced this issue Jul 19, 2022
* add enableEditAccountsOptions feature flag

* add flag to module; add companion object to be used in test to force platform parameter values

* use enableEditAccount flag to control visibilty

* add specific tests to check visibility by forcing feature flag values

* remove test module and directly force feature flag value using companion object

* add PlatformParameterForceMode class to explicitly define force method

* add forceMode parameter to functions

* optimise import after merge with develop

* move companion object to TestPlatformParameterModule.kt

* copy platform parameters for this test module

* simple code changes since older implementation was removed

* optimise imports and lint

* add enable edit account parameter explicity

* update changes to the other OptionsFragmentTest.kt

* testplatformparametermodule is a dependency for administratorcontrolactivitytest and optionsFragmentTest

* nits

* revert all changes to TestPlatformParameterModule

* Use PlatformParameterModule instead, with visibility annotation for testing

* Use PlatformParameterModule instead in tests like before

* lint

* change no longer needed

* add kdoc

* add accidently removed line

* move companion object back to TestPlatformParameterModule.kt.

* use testplatform parameter module as suggested

* lint

* remove extra resources

* lint

* fix bazel

* adjust for merge updates from develop

* lint

* resolve bazel issues

* add force method for learner study analytics and use it

* lint

* lint

* remove test parameter platform module (not required)

* nits

* nit
Repository owner moved this from Needs Triage to Done in [Team] Core Learner and Mastery flows & UI Frontend - Android Jul 19, 2022
@KolliAnitha
Copy link

KolliAnitha commented Aug 21, 2022

@BenHenning, I am still seeing the Edit account option in Administrator Controls in 0.8-alpha-091b45a188
Screenshot_2022-08-21-14-54-37-15_943a62cb4c6fb83e010e1c2e82766a17

@JishnuGoyal
Copy link
Contributor

This is happening because the default value for the parameter enableEditAccountsOptionsUi is set to true.
@BenHenning should I set it to false?

@BenHenning
Copy link
Member

Ah I missed that @JishnuGoyal. Yes, it should be off by default.

Reopening until that's addressed.

@BenHenning BenHenning reopened this Aug 22, 2022
@JishnuGoyal
Copy link
Contributor

Added a PR: #4523 . The failing test should be green after a re-run. @BenHenning

@JishnuGoyal
Copy link
Contributor

Hi, @KolliAnitha @BenHenning.
Closing this again as #4523 was merged.

@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This item is good for new contributors to make their pull request. Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

Successfully merging a pull request may close this issue.

10 participants