delta / dalal-street-client

Cross Platform(Android & Web) client for Dalal Street
https://play.google.com/store/apps/details?id=org.pragyan.dalal18
12 stars 6 forks source link

[feat]: Added Open orders page #66

Closed vpranavkrishna closed 2 years ago

siva2204 commented 2 years ago

openOrder implementation looks good, one more thing we need add is real-time updates in open orders page

GetMyOrderUpdates server side rpc should be used for real-time updates

can be added with globalStreams similar to notfication stream.

with that you have to update/add open orders

Sudhindra3000 commented 2 years ago

Looks like you are using an image file for cancel button. There's already a TertiaryButton component. Use that instead

Sudhindra3000 commented 2 years ago

Few other things not related to open orders:

  1. Rename NewsDetail to NewsDetailPage, and the file to news_detail_page.dart
  2. NewsDetail is accepting these as params:

     final String text;
     final String imagePath;
     final String headline;
     final String dur;

    Just pass a MarketEvent object instead. It's the same thing

  3. There's a field in NewsDetail widget called String dur. I'm guessing it's supposed to mean duration. Anyway that field will be removed after above change, but give better names to variables from now.
  4. You are going from news page to news detail page by doing a manual Navigator.push(NewsDetail(args)) everywhere. All individual pages must to be declared in route_generator.dart. And navigate to them using Navigator.pushNamed and pass in the route and required args
Sudhindra3000 commented 2 years ago

Looks like you are using an image file for cancel button. There's already a TertiaryButton component. Use that instead

Even if there wasn't a widget, you could just create one. Or just inline the required styles. It's not hard. Don't use images or svg files for simple things like buttons

Sudhindra3000 commented 2 years ago

Few other things not related to open orders:

  1. Rename NewsDetail to NewsDetailPage, and the file to news_detail_page.dart
  2. NewsDetail is accepting these as params:

    final String text;
    final String imagePath;
    final String headline;
    final String dur;

    Just pass a MarketEvent object instead. It's the same thing

  3. There's a field in NewsDetail widget called String dur. I'm guessing it's supposed to mean duration. Anyway that field will be removed after above change, but give better names to variables from now.
  4. You are going from news page to news detail page by doing a manual Navigator.push(NewsDetail(args)) everywhere. All individual pages must to be declared in route_generator.dart. And navigate to them using Navigator.pushNamed and pass in the route and required args

Better do these things in a separate pr, after open orders in done

dhruv1294 commented 2 years ago

Cancelling orders is working but it would be better if it cancelled order real-time. So, when user long presses an item, try emitting the state again to make it look real-time

dhruv1294 commented 2 years ago

Also, remove the tertiary.png since you are not using it currently.