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

Description editing UI #2632

Merged
merged 104 commits into from Sep 25, 2018
Merged

Description editing UI #2632

merged 104 commits into from Sep 25, 2018

Conversation

montehurd
Copy link
Contributor

@montehurd montehurd commented Aug 30, 2018

https://phabricator.wikimedia.org/T193691

  • wire up web view Add title description

screen shot 2018-09-19 at 4 24 25 pm

  • wire up lead edit pencil to present Edit title description / Edit introduction / Cancel buttons

screen shot 2018-09-18 at 2 58 49 pm

  • cat and planet intro

screen shot 2018-09-18 at 12 49 46 am

screen shot 2018-09-18 at 12 49 51 am

  • description adding/editing form

screen shot 2018-09-19 at 4 13 09 pm

screen shot 2018-09-19 at 4 15 33 pm

screen shot 2018-09-19 at 4 16 06 pm

screen shot 2018-09-19 at 4 20 40 pm

  • title description help

screen shot 2018-09-18 at 12 54 53 am

screen shot 2018-09-18 at 12 54 57 am

  • description published panel

screen shot 2018-09-18 at 12 58 35 am

  • wire up intro panels
  • wire up help page
  • theme-ing
  • wire up to saving API & show description published panel on success WIP

will need to switch image once vector asset is ready
@montehurd montehurd changed the title Description editing Description editing UI Sep 11, 2018
@montehurd
Copy link
Contributor Author

montehurd commented Sep 20, 2018

First pass at wiring up with #2650 : montehurd@4cf1124

Will push commits to this PR once #2650 is merged - some changes may land tomorrow morning.

@@ -146,4 +146,8 @@ public class CommonStrings: NSObject {
@objc public static let appStoreShortDescription = WMFLocalizedString("app-store-short-description", value: "Download the Wikipedia app to explore places near you, sync articles to read offline and customize your reading experience.", comment: "Short description of the app for the app store")
@objc public static let appStoreReleaseNotes = WMFLocalizedString("app-store-release-notes", value: "Fully customizable and easier to read Explore feed. Localization, performance improvements and bug fixes.", comment: "Short summary of what is new in this version of the app for the app store")
@objc public static let appStoreKeywords = WMFLocalizedString("app-store-keywords", value: "Wikipedia, reference, wiki, encyclopedia, info, knowledge, research, information, explore, learn", comment: "Short list of keywords describing the app for the app store. It is required that these are individual words, not phrases, and are comma separated.")

@objc public static let editAttribution = WMFLocalizedStringWithDefaultValue("wikitext-upload-save-anonymously-warning", nil, nil, "Edits will be attributed to the IP address of your device. If you %1$@ you will have more privacy.", "Button sub-text informing user or draw-backs of not signing in before saving wikitext. Parameters:\n* %1$@ - sign in button text")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there precedent for using the parameter to fill in other localized text or some guidance from Apple that says this OK? There are likely cases where the item localized separately is different than how it would fit in the full sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good question - iirc we did this in the section editing workflow, but i'll double-check and ponder...

Copy link
Contributor

Choose a reason for hiding this comment

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

Apple's advice:

Don’t overload keys or compose phrases from multiple keys. Some languages have gender articles, adjective endings, and completely different word order. Instead, add a separate key-value pair to the strings file for all unique phrases.

For example, replace these key-value pairs:

/* Go to next page/chapter */
--
"GoToNext" = "Go to next %@";
"chapter" = "chapter";
"page" = "page";

with separate key-value pairs for each phrase:

/* Go to next chapter */
--
"GoToNextChapter" = "Go to next chapter";
 
/* Go to next page */
"GoToNextPage" = "Go to next page";

via

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/InternationalizingYourCode/InternationalizingYourCode.html#//apple_ref/doc/uid/10000171i-CH4-SW1

Copy link
Contributor Author

@montehurd montehurd Sep 25, 2018

Choose a reason for hiding this comment

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

@joewalsh
screen shot 2018-09-25 at 10 29 17 am

So to achieve ^ w/o composition... hmm... (editing uses composition too)... so maybe a single string with html links then a web view and intercept those link taps?

Copy link
Contributor Author

@montehurd montehurd Sep 25, 2018

Choose a reason for hiding this comment

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

poking around TWN docs for links deets: https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example

Update: Looks like we may be able to use {{#tag: (see very bottom of https://www.mediawiki.org/wiki/Help:Magic_words#Formatting)

</stackView>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="288" id="Ka3-zi-uhG"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

The width of the edit content on landscape should be tied to readable width instead of a fixed width. You can make the superview margins follow readable width and constrain the stack view to the margins.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@montehurd montehurd removed the WIP label Sep 24, 2018
@joewalsh joewalsh merged commit 0f98c67 into develop Sep 25, 2018
@joewalsh joewalsh deleted the add/description-editing/T193691 branch September 25, 2018 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants