Git Product home page Git Product logo

area51's People

Contributors

andergoig avatar aralatpulat avatar dulithadabare avatar emichaux avatar errornow avatar felixfoertsch avatar jackattack24 avatar kgellci avatar lucashoeft avatar mahmoudfotta avatar nickset avatar rj-clegg avatar sinbu avatar slo-addy avatar squarefrog avatar yonodactyl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

area51's Issues

Clean up SubredditsViewController

The main goal of this small refactor is to remove the need to unwrap SubredditSections each time we want to use it in our UITableViewDataSource and UITableViewDelegate methods.

On top of that, to keep the code consistent, we will remove self. from properties that the compiler require it to be set on - refer to issue 61

Refactor ListingService to support subreddits and posts

ListingService is being used as the main point of entry to receive both posts of a subreddits and subreddits. Listings are actually objects which can be multiple different types and are defined by a kind key https://www.reddit.com/dev/api

Post being t3 kind and Subreddit being t5 kind.

To accommodate and make things easier to user, I will implement two new services:

PostService: Deals with fetching and parsing subreddit posts
SubredditService: Deals with fetching and parsing subreddits

Create a design mockup

I would like to create a design mock-up for the entire app. That way we don’t have fragmented design

Create ListingViewModel and convert FeedViewModel to use

FeedViewModel has logic for formatting listings. It is doing this by mutating the Listing objects in place.

https://github.com/kgellci/Area51/blob/master/Area51/Sources/ViewModels/FeedViewModel.swift#L37

We should instead instantiate ListingViewModel from a listing which will apply the needed formatting to the required fields. We can probably convert ListingsDataSource to be a ListingViewModelDataSource which would give the added benefit of only formatting listings once instead of every time more listings are loaded.

Add subreddit querying to SubredditService

To the SubredditService module, add a method which takes a query string for the search term and returns a list of subreddits which match the query.

You can do this by adding a new route to SubredditService/Sources/APIRoute+Subreddit.swift
The route is subreddits/search

You will then need to create a new api call in SubredditService module which uses CoreAPI.results... with the newly specified route. You will also need to pass through the query string as a parameter all the way through to CoreAPI which makes the call.

[design] Create a dark color scheme

Many users browse Reddit at night. Staring a a bright white screen at 3 am is no fun.
Would be nice for someone to create a color scheme for the following attributes:

  • Primary background color
  • Secondary background color
  • Primary text color
  • Secondary text color
  • Link / Button color

Hex values or RGB would be πŸ‘
Example in the below screenshot from Settings App:

  • Primary bg color: White of the cell
  • Secondary bg color: Gray behind the cells
  • Primary text color: "Bluetooth"
  • Secondary text color: "On"

img_c69cf71a6b92-1

Improve displaying of the default subreddits

The "Default Feeds" are currently unordered and formatting doesn't look good. The default subreddits should be in an alphabetical order and formatted like /r/AskReddit instead of /r/AskReddit/.

Screenshots

simulator screen shot - iphone xs - 2019-02-22 at 21 19 13

[ListingTableViewCell] Unable to simultaneously satisfy constraints.

If someone wants to debug, constraints are breaking in ListingTableViewCell at runtime.

[LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x600001d45130 ImageService.NetworkImageView:0x7fc936650a20.height == 80   (active)>",
    "<NSLayoutConstraint:0x600001d45720 UIStackView:0x7fc936650820.top == UITableViewCellContentView:0x7fc93664ed10.topMargin   (active)>",
    "<NSLayoutConstraint:0x600001d457c0 UIStackView:0x7fc936650820.bottom == UITableViewCellContentView:0x7fc93664ed10.bottomMargin   (active)>",
    "<NSLayoutConstraint:0x600001d42a80 'UISV-canvas-connection' UIStackView:0x7fc936650820.top == ImageService.NetworkImageView:0x7fc936650a20.top   (active)>",
    "<NSLayoutConstraint:0x600001d42df0 'UISV-canvas-connection' V:[_UILayoutSpacer:0x6000001023a0'UISV-alignment-spanner']-(0)-|   (active, names: '|':UIStackView:0x7fc936650820 )>",
    "<NSLayoutConstraint:0x600001d42bc0 'UISV-spanning-boundary' _UILayoutSpacer:0x6000001023a0'UISV-alignment-spanner'.bottom >= ImageService.NetworkImageView:0x7fc936650a20.bottom   (active)>",
    "<NSLayoutConstraint:0x600001d45900 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x600000746920'UIViewLayoutMarginsGuide']-(8)-|   (active, names: '|':UITableViewCellContentView:0x7fc93664ed10 )>",
    "<NSLayoutConstraint:0x600001d43160 'UIView-Encapsulated-Layout-Height' UITableViewCellContentView:0x7fc93664ed10.height == 96   (active)>",
    "<NSLayoutConstraint:0x600001d45860 'UIView-topMargin-guide-constraint' V:|-(8)-[UILayoutGuide:0x600000746920'UIViewLayoutMarginsGuide']   (active, names: '|':UITableViewCellContentView:0x7fc93664ed10 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600001d45130 ImageService.NetworkImageView:0x7fc936650a20.height == 80   (active)>

Test files should reside in their own folders

After running make generate on the current commit, the previously added test file is added to a Tests path. This is ok for the one test we have now, but looking forward this will likely cause confusion.

I propose we split test files in the Xcode Project into folders, named after their target. For example, rather than what we have now:

Area51
  |
  | Tests

We will have

Area51
  |
  | CoreTests
  | CoreAPITests

And so on.

screenshot 2019-02-27 at 12 05 51

Add a TabBar as the root navigation

We should add a TabBarController with two tabs to start.

  • The first tab should hold the SplitViewController for the list of subreddits and feed.
  • The second tab should take you to a blank ViewController where we can turn it into a settings screen.

Use AspectFill for images on ListingTableViewCell

Some images look a bit squished as shown in the screenshot below. We should set the content mode of the ImageView in ListingTableViewCell.xib to be Aspect Fill. We should also enable Clip to Bounds so the image does not bleed outside of the ImageView.

screen shot 2019-02-24 at 3 22 29 pm

Adopt the MVVM paradigm - FeedViewController a good place to start.

From discussions in this PR - adopting the Model-View-ViewModel paradigm would allow us to separate our business logic from our Views. This will also help us Unit Test better and easier.

I'll kick start this off, by introducing it in the FeedViewController - this will involve the following:

  • Moving all business logic out of the VC
  • Removing all references to any services etc from the VC
  • Refactoring the code in FeedViewController a little bit as part of this issue to use a Model instead. Ie The UITableViewDataSource will need to communicate with the model directly instead of a collection.

If successful, we should follow this paradigm with new screens we add to the app along with unit testing.

Use reddit search api to display results when typing into the search field

Is your feature request related to a problem? Please describe.
Try to search for a given subreddit not in the default subreddits list

Describe the solution you'd like
Use the reddit search API to find subreddits matching the keywords typed into the search bar. ( Search bar implemented in #44 )
Display the matching subreddits to the user.
Allow the user to navigate to the selected subreddit page.

Add SwiftLint

We should add SwifLint to help out with enforcing some coding standards within the project.

Add Unit tests

Since this project is aimed at beginners and show casing latest iOS development techniques; we should also include unit testing with this project.

Thoughts?

Add community icons for subreddits

Describe the solution you'd like
Add community icons to the subreddits displayed in the Subreddits VC.
Community icon urls are available in the default subreddit listings.

Additional context
Icons can be added to the tableview cell as shown in the screenshot below

redditscreen

UI Issue with UISearchBar in Landscape mode

Describe the bug
When the Search Bar is focused in landscape mode, the top part of the search bar seems to be cutoff. Issue can be avoided by disabling the animation for moving the title of the view upwards.
To Reproduce
Steps to reproduce the behavior:

  1. Go to Subreddits view
  2. Rotate device to landscape mode
  3. Click on the Search Bar to focus on it and bring up the keyboard
  4. See error

Expected behavior
There should be a space between the edge of the screen and the Search Bar. The Search Bar should be completely visible
Screenshots
screen shot 2019-02-25 at 8 09 06 pm

Smartphone (please complete the following information):

  • Device: iPhone 6S
  • OS: iOS 12.1

Additional context
The issue can be avoided by disabling the UI animation which occurs when the Search Bar is focused.

Add which subreddit a post belongs to in FeedsViewController

Is your feature request related to a problem? Please describe.
Whilst browsing the feeds, it would be helpful to know which subreddit a particular post belongs to

Describe the solution you'd like
Perhaps a small label at the top (left or right) of each ListingTableViewCell in the FeedViewController showing which subreddit the post belongs to - perhaps also in a different colour?

Describe alternatives you've considered
Not sure about alternatives to this feature; the only place for it is in each ListingTableViewCell

Additional context
Since every post (Listing) has to belong to a subreddit; there should be no logic to hide this label and therefore it should be easy enough to add above the top level UIStackView in that cell. However I would perhaps wrap it in, it's own UIStackView set to horizontal alignment. This way, should we add new labels to the top of the cell, we won't have to mess about with AutoLayout constraints directly.

Add support for Danger

As noted in #83 (comment) it may be useful for someone to setup Danger.

This would automate the initial QA of a Pull Request. It's easy to forget things sometimes, so this could automatically check the following:

  • Does SwiftLint pass?
  • Does it change significant parts of the app without unit tests?
  • Is the new code missing comments?
  • Have you updated the CHANGELOG?
  • Did you accidentally include a copyright header?

This would probably need the project owner to setup, as it relies on a GitHub bot to run automatically. See Getting Started.

Add a search bar to search subreddits

Is your feature request related to a problem? Please describe.
I would like to add a search bar to the subreddit view to search for subreddits.

Describe the solution you'd like
I would like add a search bar to filter default subreddits.

Add a screen to view reddit posts natively

Is your feature request related to a problem? Please describe.
Currently, the reddit posts are viewed using a web view.

Describe the solution you'd like
Add a screen to view posts natively.

Additional context
The screen should display the following:

  • Post heading
  • Post OP
  • Post Body
  • Karma
  • Number of comments

Display preview of posts in Cells

It would be great to show a preview of the post (either a link or the description) under the title of the table view cells.

This could be accomplished by using a cell preset with two labels.

Road map and design

Hi all,

I personally think this project will benefit greatly with a bit of direction / design and a roadmap. I feel without this, there will be lots of inconsistency throughout the app.

Areas of focus:

  • Overall look and feel of the app
  • Version 1 feature set
  • Design guidelines (Font types, weight, coloraturas schemes, etc)

On top of all this and maybe other things to consider; I suggest maybe a Slack workspace for all contributors to communicate on - discuss things easier and then create issues on GitHub out of those discussions?

We could tackle the above points in a Slack channel for example?

Separating the UITableView datasource from VC and make it reusable

We should separate the UITableView's datasource from the UIViewController and try make it as reusable as possible.

Changes to be made:

  • Separate the datasource from the FeedViewController (First 'test' case and example)
  • Make the new datasource reusable.

Pros

Anytime we need to display a list of common results (In this case, Listing) we do not need to setup the UITableView's datasource - we simply instantiate it and supply it a collection of Listing objects. The rest is taken care of.

This will also separate the responsibilities a little more between the various UI layers. It as the added benefit that should we decide to change UI layout / implementation of a UITableViewCell for the given Datasource it will be all done in one place.

Cons

Don't see any immediate cons to this approach. It's an extra file in the project per datasource that we create - however I feel this is minor.

As part of this change, I will also clean up the code in FeedViewController and make it ready for a review in the next day or two.

I think we should use this as an example to implement other datasources for UiTableViews if accepted through a PR. We don't always have to aim for high reusability in every case - can judge that on a case by case basis.

[design] App Icon

We need an app icon else we can't distribute beta builds!

Following Apples HIG for icon design is the best place to start!

Appreciated files would be any of the following:

  • .sketch
  • .pdf
  • 1024x1024 .png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.