Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Merge and deploy 1.19.0 (#1754)
Browse files Browse the repository at this point in the history
* bump version to 1.19.0 (#1587)

* [ADD] Refactoring short cut handler to use enum based Routes (#1591)

* [CHOR] Delete old bookmark model and cleanup folder structure (#1589)

* update notification cells when ago string changes (#1588)

* Removing #available conditionals (#1578)

* Release notifications (#1546)

* releases WIP

* loading releases working

* Sign in: Fix UI in smaller screens (#1595)

* Remove HangingChadItem (#1605)

Referencing #1327 (comment)

* [WIP] Refactor networking to shared lib (#1602)

* [WIP] Refactor networking to shared lib

* notification models as codable and tests

* default request params

* break out into files

* fix tests

* check notification values

* add milestones

* add milestone response

* repo notifications

* refactor v3 response

* refactor to support passing response to response initializer

* add release fetch and model

* add examples from githawk

* notifications working

* almost all notifications requests migrated

* finish notification migration, add graphql request/response

* replace issue requests

* replace milestones request

* fetch assignees migrated

* readme fetch migrated

* migrate badge request

* delete unused request from client

* remove paging

* nearly done w/ migration

* local build green

* refactor gql fetches, replace mutations

* build green, slim down client

* strip session manager from client

* everything working

* Add merge status tests (#1604)

* Add merge status tests

* Introduce containsAll and containsNone

* Rename containsAll to containsOnly

* Accessibility improvements (#1603)

* Add an a11y hint to the navigationbar title

* Improve accessibility for merge contexts

* Improve accessibility for merge summaries

* Improve accessibility for the merge button

* update message VC pod (#1610)

* remove dead code (#1611)

* Make the repositories' desciption optional (#1617)

* Fancy new README (#1462)

* add new readme animation

* loop

* update readme

* clean up login client (#1612)

* [ADD] Center align App Store badge (#1620)

* Immutability with mutability blog post (#1622)

* add immutable blog post

* add closing

* fix indenting (#1623)

* raw template

* better words (#1624)

* Copyedit (#1625)

* swap dates (#1626)

* Add ContextMenu library (#1632)

* add contextmenu lib

* update to latest

* Update IGListKit lib to latest and swift preview branch (#1633)

* update IGListKit lib to latest and swift preview branch

* add swift subspec

* Add PDF support (#1596)

* Add string extension for searching pdf files (#1552)

* Create RepositoryWebViewController (#1552)

* Initial presenting of the pdf files (#1552)

* refactor: Rename String+Resource -> String+BinaryFile (#1552)

* Build destination URL (#1552)

* Configure title (#1552)

* Encode file path

* Use EmptyView for errors

* Replace UIWebView with WKWebView

* Review fixes

* refactor: Make binarySuffix computed property

* Unify if-else path

* Group guard statements

* Move session management to local pod and add app group (#1636)

* move session management to local pod and add app group

* copy paste fail from SO

* fix save using old keys (#1637)

* token response needs to accept json (#1638)

* show files without patches (#1639)

* Create a custom UIAccessibilityElement for the merge button (#1643)

* Refactor PeopleViewController to subclass BaseListViewController (#1512)

* Remove People.storyboard

* Refactor PeopleCell

* Refactor PeopleViewController to BaseListViewController

* Add PeopleSectionController

* Add paging params to assignees request

* Resolve networking refactor conflicts

* Init PeopleViewController manually

* Remove unused method

* test out context menu on labels, people, milestones (#1644)

* request

V3PullrequestRequest added

* UI

model, cell and section controller added

* request

requesting pull request information in IssuesViewController

* displaying data

Displaying branches in IssuesViewController

* ui

moved branches label higher

* rename

files renamed

* Remove duplicate iPad7,3 case

* text setup

text setup moved to IssueTargetBranchModel

* cleanup

commented code removed

* update ContextMenu pod (#1654)

* Move references to old url (#1652)

* Update 3D touch items when switching account. (#1646)

* bugfix(Issue-1592-3D-Touch-Not-Updated): update 3D touch items when switching account.

* bugfix(Issue-1592-3D-Touch-Not-Updated): switch to the most recent account and update 3D touch user item when switching account.

* fix an indentation problem to ShortcutHandler

* add the app delegate as a listener and configure ShortcutHandler on didFocus(...)

* restore whitespace

* consistent alignment

* remove done button from context menu VCs (#1655)

* Update Apollo to 0.8.0 and codegen to 0.18.8 (#1656)

* update styledtext pod (#1657)

* GraphQL

- added base branch reference to GraphQL query
- removed previous base branch request implementation
- IssuesViewController adopted new request implementation

* requests

fetchBranches method removed

* old request removed

V3PullRequestRequest

* Start refactoring text views with StyledText (#1658)

* refactoring with styledtext

* issue rename refactored

* fix tests

* Refactor labeled events to use StyledText (#1659)

* refactor tap handling on attributed views

* styled cell interaction working

* share menu code

* label events finished

* Infer types and arguments in-app

* Infer types and arguments in local pods

* Rename "Archived" to "All" (#1662)

* Fixing overlap content after react menu on comment. (#1577)

* Fixing overlap content after react menu.

* more elegant solution for the fix. :))

* Make Toast init non-optional, post a11y notification (#1670)

* add feed.viewDidAppear(animated) in viewDidAppear.

* Refactor markdown parsing to use text lib (#1674)

* milestones refactored with styled text

* reference refactored

* refactor commit references

* fix styled text bug

* request event refactored

* refactor titles

* warm caches for bg-gen models

* delete old text cell

* move shortlinks into MMMarkdown

* almost there

* build green

* running and trimming whitespaces

* styled text working

* fix tests

* tests passing

* Readd repo notifications (#1689)

* Differentiate between a repo and all request

* Bonus track: a11y

* Use Bool.description

* Enable invitation decoding (#1687)

* Fix invitation decoding

* Add a test

* Remove unused WriteButton class and related assets. (#1676)

* add feed.viewDidAppear(animated) in viewDidAppear. (#1678)

* Port to Xcode 9.3 (#1696)

* Rewrite markdown parsing with cmark (#1704)

* add cmark lib, build succeeds

* building and running (with dupe asserts)

* list newlines, quote styles

* tables working in cmark

* fix table bg color math and code bg color

* code block highlighting only when theres a language

* share code block logic

* mentions need @

* update cmark lib

* shortlinks

* detect issue shortlinks

* simplify and correct shortlinks

* remove html comments

* tests passing

* Enable view source to open in GitHawk

* Simplify deselectRow logic

* New text system adopted

- changed NSAttributedStringSizing to StyledTextRenderer (IssueTargetBranchModel)
- Removed redundand code from IssuesViewController
- Changed method for text height in IssueBranchesSectionController

* update cmark lib (#1708)

* retain badge object when fetching notifications (#1709)

* add Reply action on didTapMore(cell: sender:)

* make messageView firstResponder onReply action

* focus on the comment on reply action

* quote a substring of the comment and mention the user in messageView on reply.

* remove "import MessageViewController" from IssueCommentSectionController

* refactor the code

* Change two flatMaps to compactMap

* Improve number readability

* make IssueCommentSectionController conform to MarkdownStyledTextViewDelegate (#1718)

* support the case for IssueTargetBranchModel (#1720)

* Link to the right repo (#1716)

* update cmark with checkbox support (#1725)

* Restore to automatic code signing (#1726)

* restore to automatic signing

* set all profiles to dev for auto signing

* Remove MMMarkdown dependency (#1729)

* replace old markdown callsites

* unit tests working

* remove unused parsing

* final removal of old parsing, build and tests succeed

* remove dependency

* capture readme ref branch

* Fix flickering when navigating back (#1728)

* Always update inbox when receiving changes (#1730)

* Skip loading status when inbox empty (#1731)

* Show empty string when no markdown (#1732)

* Add title to merge toggle

* use word "change"

* less thrashy loading spinner

* correct removal of bg view

* github syntax search working

* MessageViewController update (#1741)

* update action label when value changes, make actions diffable

* Update IGListKit swift branch after rebase

* Update MessageViewController pod

* fix build, update w/ latest fixes

* use utf16 for tag ranges (#1738)

* update action label when value changes, make actions diffable (#1739)

* merge model should return true for use with binding SC (#1742)

* smaller labels (#1744)

* add extra space for label events (#1751)

* Code blocks share system font adjustment, use StyledText (#1752)

* add space to default search string (#1750)

* update StyledText to fix NSAttributedString overwriting (#1753)
  • Loading branch information
rnystrom committed Apr 22, 2018
1 parent d08ecbb commit abcd86c
Show file tree
Hide file tree
Showing 661 changed files with 78,268 additions and 17,919 deletions.
59 changes: 0 additions & 59 deletions Classes/Bookmark v2/BookmarkViewModel.swift

This file was deleted.

File renamed without changes.
Expand Up @@ -8,6 +8,7 @@

import UIKit
import SnapKit
import StyledText

final class BookmarkCell: SwipeSelectableCell {

Expand All @@ -19,7 +20,7 @@ final class BookmarkCell: SwipeSelectableCell {
)

private let imageView = UIImageView()
private let textView = AttributedStringView()
private let textView = StyledTextView()
private let detailLabel = UILabel()

override init(frame: CGRect) {
Expand Down Expand Up @@ -74,7 +75,7 @@ final class BookmarkCell: SwipeSelectableCell {

func configure(viewModel: BookmarkViewModel, height: CGFloat) {
imageView.image = viewModel.bookmark.type.icon.withRenderingMode(.alwaysTemplate)
textView.configureAndSizeToFit(text: viewModel.text, width: contentView.bounds.width)
textView.configure(renderer: viewModel.text, width: contentView.bounds.width)

// set "Owner/Repo #123" on the detail label if issue/PR, otherwise clear and collapse it
switch viewModel.bookmark.type {
Expand Down
103 changes: 0 additions & 103 deletions Classes/Bookmark/BookmarkModel.swift

This file was deleted.

Expand Up @@ -32,7 +32,7 @@ final class BookmarkSectionController: ListGenericSectionController<BookmarkView

return CGSize(
width: width,
height: max(object.text.textViewSize(width).height, Styles.Sizes.tableCellHeightLarge)
height: max(object.text.viewSize(width: width).height, Styles.Sizes.tableCellHeightLarge)
)
}

Expand Down
Expand Up @@ -155,14 +155,18 @@ TabNavRootViewControllerType {
// MARK: ListAdapterDataSource

func objects(for listAdapter: ListAdapter) -> [ListDiffable] {
let contentSizeCategory = UIApplication.shared.preferredContentSizeCategory
let width = view.bounds.width
var bookmarks: [ListDiffable]
switch state {
case .idle:
bookmarks = bookmarkStore.values.flatMap { BookmarkViewModel(bookmark: $0, width: view.bounds.width) }
bookmarks = bookmarkStore.values.compactMap {
BookmarkViewModel(bookmark: $0, contentSizeCategory: contentSizeCategory, width: width)
}
case .filtering(let term):
bookmarks = filtered(array: bookmarkStore.values, query: term)
.flatMap { bookmark in
BookmarkViewModel(bookmark: bookmark, width: view.bounds.width)
.compactMap {
BookmarkViewModel(bookmark: $0, contentSizeCategory: contentSizeCategory, width: width)
}
}

Expand Down
54 changes: 54 additions & 0 deletions Classes/Bookmark/BookmarkViewModel.swift
@@ -0,0 +1,54 @@
//
// BookmarkViewModel.swift
// Freetime
//
// Created by Hesham Salman on 11/5/17.
// Copyright © 2017 Ryan Nystrom. All rights reserved.
//

import UIKit
import IGListKit
import StyledText

final class BookmarkViewModel: ListDiffable {

let bookmark: Bookmark
let text: StyledTextRenderer

private let _diffIdentifier: NSObjectProtocol

init(bookmark: Bookmark, contentSizeCategory: UIContentSizeCategory, width: CGFloat) {
self.bookmark = bookmark

let builder = StyledTextBuilder(styledText: StyledText(
style: Styles.Text.body.with(foreground: Styles.Colors.Gray.dark.color)
))
switch bookmark.type {
case .issue, .pullRequest:
builder.add(text: bookmark.title)
case .commit, .repo:
builder.add(text: "\(bookmark.owner)/")
.add(text: bookmark.name, traits: .traitBold)
case .release:
builder.add(text: bookmark.title)
}

text = StyledTextRenderer(
string: builder.build(),
contentSizeCategory: contentSizeCategory,
inset: BookmarkCell.titleInset
)
_diffIdentifier = "#\(bookmark.number)\(bookmark.name)\(bookmark.owner)\(bookmark.title)" as NSObjectProtocol
}

// MARK: ListDiffable

func diffIdentifier() -> NSObjectProtocol {
return _diffIdentifier
}

func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
return true
}

}
1 change: 0 additions & 1 deletion Classes/Image Upload/ImageUploadTableViewController.swift
Expand Up @@ -18,7 +18,6 @@ class ImageUploadTableViewController: UITableViewController {

@IBOutlet private var previewImageView: UIImageView! {
didSet {
guard #available(iOS 11, *) else { return }
previewImageView.accessibilityIgnoresInvertColors = true
}
}
Expand Down
13 changes: 8 additions & 5 deletions Classes/Issues/AddCommentClient.swift
Expand Up @@ -43,8 +43,12 @@ final class AddCommentClient {
func addComment(subjectId: String, body: String) {
let bodyWithSignature = Signature.signed(text: body)

client.perform(mutation: AddCommentMutation(subject_id: subjectId, body: bodyWithSignature)) { (result, error) in
if let commentNode = result?.data?.addComment?.commentEdge.node {
let mutation = AddCommentMutation(subject_id: subjectId, body: bodyWithSignature)
client.client.mutate(mutation, result: { data in
data.addComment?.commentEdge.node
}) { result in
switch result {
case .success(let commentNode):
let fragments = commentNode.fragments
for listener in self.listeners {
listener.listener?.didSendComment(
Expand All @@ -56,13 +60,12 @@ final class AddCommentClient {
viewerCanDelete: fragments.deletableFields.viewerCanDelete
)
}
} else {
case .failure:
for listener in self.listeners {
listener.listener?.didFailSendingComment(client: self, subjectId: subjectId, body: body)
}
ToastManager.showGenericError()
}

ShowErrorStatusBar(graphQLErrors: result?.errors, networkError: error)
}
}

Expand Down
5 changes: 2 additions & 3 deletions Classes/Issues/Assignees/IssueAssigneeAvatarCell.swift
Expand Up @@ -21,9 +21,8 @@ final class IssueAssigneeAvatarCell: UICollectionViewCell {
imageView.layer.borderColor = Styles.Colors.Gray.light.color.cgColor
imageView.layer.borderWidth = 1.0 / UIScreen.main.scale
imageView.clipsToBounds = true
if #available(iOS 11, *) {
imageView.accessibilityIgnoresInvertColors = true
}
imageView.accessibilityIgnoresInvertColors = true

contentView.addSubview(imageView)
}

Expand Down
5 changes: 2 additions & 3 deletions Classes/Issues/Assignees/IssueAssigneeUserCell.swift
Expand Up @@ -24,9 +24,8 @@ final class IssueAssigneeUserCell: UICollectionViewCell, ListBindable {
imageView.layer.borderColor = Styles.Colors.Gray.light.color.cgColor
imageView.layer.borderWidth = 1.0 / UIScreen.main.scale
imageView.clipsToBounds = true
if #available(iOS 11, *) {
imageView.accessibilityIgnoresInvertColors = true
}
imageView.accessibilityIgnoresInvertColors = true

contentView.addSubview(imageView)
imageView.snp.makeConstraints { make in
make.centerY.equalTo(contentView)
Expand Down
34 changes: 34 additions & 0 deletions Classes/Issues/Branches/IssueBranchesSectionController.swift
@@ -0,0 +1,34 @@
//
// IssueBranchesSectionController.swift
// Freetime
//
// Created by Yury Bogdanov on 13/03/2018.
// Copyright © 2018 Ryan Nystrom. All rights reserved.
//

import UIKit
import IGListKit

final class IssueTargetBranchSectionController: ListSectionController {

var object: IssueTargetBranchModel?

override func didUpdate(to object: Any) {
guard let object = object as? IssueTargetBranchModel else { return }
self.object = object
inset = UIEdgeInsets.zero
}

override func sizeForItem(at index: Int) -> CGSize {
guard let width = collectionContext?.insetContainerSize.width else { fatalError("Collection context must be set") }
return CGSize(width: width, height: self.object?.targetBranchText.viewSize(width: width).height ?? 0)
}

override func cellForItem(at index: Int) -> UICollectionViewCell {
guard let object = self.object,
let cell = collectionContext?.dequeueReusableCell(of: IssueTargetBranchCell.self, for: self, at: index) as? IssueTargetBranchCell
else { fatalError("Collection context must be set, missing object, or cell incorrect type") }
cell.set(renderer: object.targetBranchText)
return cell
}
}
17 changes: 17 additions & 0 deletions Classes/Issues/Branches/IssueTargetBranchCell.swift
@@ -0,0 +1,17 @@
//
// IssueTargetBranchCell.swift
// Freetime
//
// Created by Yury Bogdanov on 13/03/2018.
// Copyright © 2018 Ryan Nystrom. All rights reserved.
//

import UIKit
import SnapKit

final class IssueTargetBranchCell: StyledTextViewCell {

static let inset = UIEdgeInsets.zero

}

0 comments on commit abcd86c

Please sign in to comment.