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

Bulletin Board view #4775

Merged
merged 2 commits into from
Feb 23, 2020
Merged

Conversation

vakhoir
Copy link
Contributor

@vakhoir vakhoir commented Jan 23, 2020

Ho boy, this is going to be a big one - every ad has it's own UI code. This is just a WIP PR if anyone wants to keep track of the progress, and give feedback.

In the mean time I'm refactoring the the Market widget a bit. I already felt I'm pushing it with the Ship Market, because it wasn't using half the handlers the other markets were, it just needed a table with item highlighting, so out it goes into it's own widget.

The Ship Market now just uses a new Table widget, and there's a basic Bulletin Board that disaplays the ads, but not much more.

@impaktor
Copy link
Member

This is great!

I feared this would be an enormous job, that would scare away anyone sane enough to try to make the conversion, due to the many mission modules. 👍

Maybe you don't need to do all modules

I'm planning/trying to no move a couple of the BBS-modules to a new tab, called a "Bar". I'm sketching on it but haven't pushed a branch yet, but I would be more than happy to collaborate, as I'm not good at pigui / trying to learn - in fact, I'm way below the skill-level that my plan would need. My point is: possibly not all the BBS modules need transferring to a new "pigui-BBS", as I'd like some of them to go elsewhere, specifically: Assassionation, Advice, and GoodsTrader. So maybe do them last, -- or not at all, if you're on board with adding a "Bar" tab-instead.

Please see the forum-post I just made on this topic here (or come by IRC CET-time).

Regarding (Ship/Commodity/Equipment) Markets

In the mean time I'm refactoring the the Market widget a bit.

A bit off topic, and I don't know how Ship-market code overlaps with the other two markets, but if you want to play with the equipment market, it probably needs to be more similar to commodity, in that on the right hand pane, one could show stats on each selected equipment (something we're really missing currently), and the "_DESCRIPTION" strings similar as in the commodity market. Buy/Sell wouldn't be by single click, but by actively clicking a buy/sell button. At least, that's my suggestion. Design discussion should possibly be taken in a separate WIP PR for those improvements, or Forum/IRC.

@vakhoir
Copy link
Contributor Author

vakhoir commented Jan 23, 2020

I feared this would be an enormous job, that would scare away anyone sane enough to try to make the conversion, due to the many mission modules

Joke's on you, I do not meet that basic requirement to be scared.

Maybe you don't need to do all modules

Let's see how it goes. A "Bar" tab sounds like a cool idea, but characters will probably end up as modules anyway. Unless you're planning to redesign the entire interaction, the chat form from the Bulletin Board tab could be easily reusable there.

Regarding (Ship/Commodity/Equipment) Markets

Not a problem. I believe the reason why it's set up the way it is right now, is because right now you can sell equipment a station has no tech-level for. These items are not displayed on the station inventory. One way to go around that would be to display all items available in the game, but show they're not in stock, and never will be, like with a "-" or "N/A".

The descriptions are already displayed in a tooltip if you hover over an item, but take note: not all items have a description. So if we want to move to a commodity-like view, someone will need to fill these in.

We might also want to consider adding some graphics. The Ship Market has the model spinner, the Commodity Market has icons for each item, it would probably be a good idea to add something for equipment as well, otherwise it will look pretty bland.

@sturnclaw
Copy link
Member

Regarding the equipment and ship markets, we've been discussing how to redesign them for quite a while. There are a number of mockups by @nozmajner kicking around on the forum, and while I'd love to jump straight in to completely reworking all of the markets, I'd much rather have some basic underpinnings taken care of like stripping out the newUI code and getting pigui to be much more error resistant.

I don't mean to throw water on the fire here; pretty much everyone on the UI team has grand plans, but we're so close to being able to rip out newUI that I'd like to focus on getting that finished. 😄

@sturnclaw sturnclaw mentioned this pull request Jan 23, 2020
7 tasks
@vakhoir
Copy link
Contributor Author

vakhoir commented Jan 23, 2020

I don't mean to throw water on the fire here; pretty much everyone on the UI team has grand plans, but we're so close to being able to rip out newUI that I'd like to focus on getting that finished.

No worries, I'm also for getting the conversion to PiGui out of the way first.

@bszlrd
Copy link
Contributor

bszlrd commented Jan 23, 2020

I can do mockups if needed as part of the discussion. Not sure how much brain capacity I can muster, but let's give it a shot.

@vakhoir vakhoir force-pushed the feature/bulletin_board branch from 724df8a to 21702fb Compare January 25, 2020 17:29
@impaktor
Copy link
Member

impaktor commented Jan 29, 2020

  • It might be good to have code/layout of GoodsTrader's black market to overlap as much as possible with normal commodity market, only difference being we might want it rendered in a dialogue window instead of a full screen tab.

  • This will also tie into Mission screens in the InfoView, right? As there one can also review the mission dialouge in a window.

@impaktor
Copy link
Member

Hey @vakhoir

We (me, @nozmajner, and @Web-eWorks) had a longish discussion today on IRC about the BBS-rework, and we wish you could have been with us, but the next best thing is telling you what we arrived at: I think the TL;DR is this:

  • the "conversation" one has with mission contractor is pointless, and makes everything very "same-ish", why is the player having the same conversation with every advert e.g. "is there any risk?", etc. thus:

  • 6 years ago (!), when we were moving from OldUI (Frontier clone UI in C++) to NewUI (port to Lua), @nozmajner did this mockup (picasa has died since then, so only thumbnail remains, but he has the original somewhere), so:

  • have all adverts be of a standard form, and drop all(?) the "conversations". We probably want a split view, where you see the advert on the right half, as seen in the mockup linked above.

  • Also, on the list of all adverts, each takes up two rows, consisting of a main headline, and a sub-headline (e.g. Interstellar Delivery to Haberworth). (I can add sub-headlines to missions, and/or we can initially just use place holder, just something to keep in mind if we/you want to design the new BBS like in the mockup right away)

  • We also think a future Bar (forum link) should basically be like the present day BBS, i.e. you "chat" with people, ask questions, and such. This (a Bar) is something I'm tinkering with.

  • There were also discussions / dreaming of what happens down the line, changing themes, fonts, - but lets take one big code change per decade.

  • Side note: We also thought/are OK with dropping the (NewUI) Galaxy view so, once InfoView and StationView are in pigui, the NewUI stuff is 100% gone. (then we're back to only having two UI systems :P for a little while longer, with the OldUI orbit-view stuff). NewUI should be ripped out to help with the hot-reload PR. Possibly @Web-eWorks said he want/will(?) to do that.

You'll find the log from the discussion today here (beware it's longish):
IRClog_20200129.txt

You're of course welcome to IRC for a chat, (time stamps are in CET), at any time!

@vakhoir
Copy link
Contributor Author

vakhoir commented Jan 29, 2020

Hi!

6 years ago (!), when we were moving from OldUI (Frontier clone UI in C++) to NewUI (port to Lua), @nozmajner did this mockup (picasa has died since then, so only thumbnail remains, but he has the original somewhere), so:

Also, on the list of all adverts, each takes up two rows, consisting of a main headline, and a sub-headline (e.g. Interstellar Delivery to Haberworth). (I can add sub-headlines to missions, and/or we can initially just use place holder, just something to keep in mind if we/you want to design the new BBS like in the mockup right away)

I think this is something I can fit into this PR. I might need another mockup for the Goods Trader, because I'm not sure how to fit everything into that layout, if we want to reproduce the standard Commodity Market view like you indicated in the other comment. Worst case scenario, I can just throw it into a modal window, I guess. The standard missions should be fine, in any case.

have all adverts be of a standard form, and drop all(?) the "conversations". We probably want a split view, where you see the advert on the right half, as seen in the mockup linked above.

It's a good idea, but I'd wait with this until the BB view is ported. It will be easier to test that everything is working fine if the behavior / workflow stays the same. And once we are sure we can start adjusting the mission modules to fit the new design. This will also have the advantage that missions can be handled one by one, while this PR will need to be done in one step.

This will also tie into Mission screens in the InfoView, right? As there one can also review the mission dialouge in a window.

As far as I can tell, the mission screen only prints some descriptions, and doesn't call any handlers from the mission modules, so it should be fine. I prefer to handle it separately if possible.

You're of course welcome to IRC for a chat, (time stamps are in CET), at any time!

I'm more of a poster than a chatter, but I'll try to show up more often, most likely in late afternoon / evening hours CET.

@sturnclaw
Copy link
Member

@vakhoir

I think this is something I can fit into this PR. I might need another mockup for the Goods Trader, because I'm not sure how to fit everything into that layout, if we want to reproduce the standard Commodity Market view like you indicated in the other comment. Worst case scenario, I can just throw it into a modal window, I guess. The standard missions should be fine, in any case.

No worries if this is too much work, this is more of a plan for the future than something we want to implement right this second. I was trying to brainstorm some ways to improve the BBS in addition to moving it to PiGui; moving the "personal" listings to a more traditional BBS-style format and making the current BBS the "mission board", complete with information allowing the player to quickly see which kind of missions they are interested in (without having to know exactly what kind of missions generate what titles).

It's a good idea, but I'd wait with this until the BB view is ported. It will be easier to test that everything is working fine if the behavior / workflow stays the same. And once we are sure we can start adjusting the mission modules to fit the new design. This will also have the advantage that missions can be handled one by one, while this PR will need to be done in one step.

Yeah, exactly. For now I'd be more than happy to just accomplish a shim that lets our existing bulletin board missions work with PiGui instead; they can be reworked and updated at a later date.

I'm more of a poster than a chatter, but I'll try to show up more often, most likely in late afternoon / evening hours CET.

Please do, I'd love to have you around! I'm (mostly) on during the early / mid afternoon EST, stretching into the evenings depending on my schedule, but I have backlog through @impaktor's IRC bouncer / backlog ZNC server.

Speaking of which, if you talk to @impaktor, I'm sure he could set you up with the ZNC server so you can get read in on the conversation without having to be online.

(Don't worry, the channel normally isn't nearly as active when we're not brainstorming features for pioneer; it's very low-maintenance.)

@impaktor
Copy link
Member

I'm not sure how to fit everything into that layout, if we want to reproduce the standard Commodity Market view like you indicated in the other comment. Worst case scenario, I can just throw it into a modal window, I guess. The standard missions should be fine, in any case.

Yeah, in my mind, the GoodsTrader shouldn't be on the BBS at all, it should have a pop-up modal "commodity market" window, launched from the (future) Bar.

@vakhoir
Copy link
Contributor Author

vakhoir commented Jan 31, 2020

No worries if this is too much work, this is more of a plan for the future than something we want to implement right this second.

Ok, I might need to backtrack on this. There's more parts to remake than I expected. But I think a good place to take a stab at it would be the Missions tab in the personal view.

@vakhoir vakhoir force-pushed the feature/bulletin_board branch 2 times, most recently from 868a729 to c837bd4 Compare February 17, 2020 08:19
@vakhoir vakhoir changed the title WIP: Bulletin Board view Bulletin Board view Feb 17, 2020
@vakhoir vakhoir marked this pull request as ready for review February 17, 2020 08:19
@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 17, 2020

Ok, turns out there's not so much to do in the modules, just a few minor adjustments so they don't crash on opening. Most of the old UI code is for the mission view, so I'll take care of that next.

BB01

BB02

I tried to go over all ad types to make sure they work, but maybe someone can double check everything works as intended?

@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 17, 2020

Hm, hold on the black market still doesn't work quite right.

@impaktor
Copy link
Member

Fantastic!

I wonder if one could do something about that search field. Basically, not having it steal so much margin, which I think is an artifact of the NewUI. Or is it just an effect of the vertical scrollbar being to the left of the search field? Is it possible to move it to the right of the search box? i.e. have the search box be rendered more "on top" of the first few lines.

From the screenshot it doesn't look like there's a problem (yet) with long lines (at that resolution), so nothing pressing.

Is this rebased to master? Looks like the two new pigui-screens (police and ship repair) also need their character face routine updated?

Anyway, I'll give this a test next weekend.

@vakhoir vakhoir force-pushed the feature/bulletin_board branch 2 times, most recently from b1ae9f1 to 70858e6 Compare February 17, 2020 18:47
@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 17, 2020

wonder if one could do something about that search field. Basically, not having it steal so much margin, which I think is an artifact of the NewUI. Or is it just an effect of the vertical scrollbar being to the left of the search field?

Not sure if we're talking about the same thing, but I think part of it was because the padding was done by each column seperately, rather the container child window. I flipped it around now, and also shortened the search column a bit.

BB03

I also decided to use wrapped text for job descriptions, just in case. Here's what it looks like with really long text:

BB04

Black market also works properly now.

@vakhoir vakhoir force-pushed the feature/bulletin_board branch 2 times, most recently from c5dfa45 to 8d03aa1 Compare February 17, 2020 20:22
@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 18, 2020

I Just noticed asking a potential hire to take a test causes crash. Will look into it ASAP.

Extract basic highlightable table from the Market widget
Created dedicated EquipmentMarket and CommodityMarket widgets
Added ChatForm widget
@impaktor
Copy link
Member

  • (obviously) Needs a rebase to master

  • I think the font in the chatbox is difficult to read. I think we use that font just for headlines? Might be OK on the buttons, but I'd vote for the normal text to have normal font
    2020-02-22-095358_1600x900_scrot

  • Clicking throuh options in deliver package, and then when clicking "OK, Agreed" (I think, accepting any delivery mission triggers it):

error: [string "[T] @modules/DeliverPackage/DeliverPackage.lu..."]:99: attempt to index local 'ad' (a nil value)
stack traceback:
	[string "[T] @modules/DeliverPackage/DeliverPackage.lu..."]:99: in function <[string "[T] @modules/DeliverPackage/DeliverPackage.lu..."]:96>
	(...tail calls...)
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:54: in function 'adActive'
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:76: in function 'renderItem'
	[string "[T] @pigui/libs/table.lua"]:113: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:129: in function 'child'
	[string "[T] @pigui/libs/table.lua"]:80: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:159: in function 'withStyleVars'
	[string "[T] @pigui/libs/table.lua"]:79: in function 'render'
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:150: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:159: in function 'withStyleVars'
	...
	[string "[T] @pigui/views/tab-view.lua"]:94: in function 'fun'
	[string "[T] @pigui/piguierror: Frame instance deletion outside 'DeleteFrame' [0]
  • Applying for membership in fuelclub, (after asking about radioactive disposal):
error: [string "[T] @pigui/libs/chat-form.lua"]:93: attempt to index local 'option' (a nil value)
stack traceback:
	[string "[T] @pigui/libs/chat-form.lua"]:93: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:139: in function 'withFont'
	[string "[T] @pigui/libs/chat-form.lua"]:60: in function 'render'
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:121: in function 'innerHandler'
	[string "[T] @pigui/libs/modal-win.lua"]:61: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:171: in function 'withStyleColorsAndVars'
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:50: in function 'outerHandler'
	[string "[T] @pigui/libs/modal-win.lua"]:59: in function 'drawModals'
	[string "[T] @pigui/libs/modal-win.lua"]:70: in function 'fun'
	[string "[T] @pigui/views/game.lua"]:100: in function 'callModules'
	[string "[T] @pigui/views/game.lua"]:265: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:101: in function 'window'
	[string "[T] @pigui/views/game.lua"]:251: in function 'fun'
	[strinerror: Frame instance deletion outside 'DeleteFrame' [0]
  • When buying a second hand equipment, the advert is still left on the BBS, and clicking it again crashes the game
error: [string "[T] @pigui/modules/station-view/02-bulletinBo..."]:99: attempt to index upvalue 'ad' (a nil value)
stack traceback:
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:99: in function 'chatFunc'
	[string "[T] @pigui/libs/chat-form.lua"]:55: in function 'New'
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:109: in function 'onClickItem'
	[string "[T] @pigui/libs/table.lua"]:124: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:129: in function 'child'
	[string "[T] @pigui/libs/table.lua"]:80: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:159: in function 'withStyleVars'
	[string "[T] @pigui/libs/table.lua"]:79: in function 'render'
	[string "[T] @pigui/modules/station-view/02-bulletinBo..."]:150: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:159: in function 'withStyleVars'
	...
	[string "[T] @pigui/views/tab-view.lua"]:94: in function 'fun'
	[string "[T] @pigui/pigui.lua"]:150: in function 'withStyleColors'
	[string "[T] @pigui/views/tab-view.lua"]:90: in funerror: Frame instance deletion outside 'DeleteFrame' [0]

@vakhoir vakhoir force-pushed the feature/bulletin_board branch from 8d03aa1 to 695cfb9 Compare February 22, 2020 09:20
@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 22, 2020

I just rebased, fixed the crashes (correction - not sure about the fuel club membership, I don't think I tested that one), and fixed #4797. I'll fix the font later today

@impaktor
Copy link
Member

Last 2 commits have the same message text?

@vakhoir vakhoir force-pushed the feature/bulletin_board branch from d02789a to 1dc5a20 Compare February 22, 2020 18:47
@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 22, 2020

Sorry, was supposed to be an amend commit. Fixed it now

@impaktor
Copy link
Member

I assume this was the last fix, so it's ready for re-review now?

@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 22, 2020

Yeah, everything should be working now!

@impaktor
Copy link
Member

impaktor commented Feb 23, 2020

Show stopper

I was just about to merge, but I discovered one show-stopper:
The chat-window width variable seems to "leak" between the goods trader and the other adverts.

  • when first clicking .e.g. delivery mission, "hang up", then "goods trader", the window is much too narrow (like the delivery mission chat window?)
  • when first clicking goods trader, then a e.g. "delivery mission", that window is much too wide, like the goods trader.

Seems like clicking twce on the goods trader seems to reset it to its propper width (or clicking at the other goods trader?), to reset the delivery mission (or most of any other mission type), I have to click on the wrongly narrow goods trader.

EDIT Or is it that the width variable is set for the next window to be interacted with?

Possible tweak

@nozmajner do you think font size could be slightly bigger?

Example of wonky width (and font size)

2020-02-23-114621_1600x900_scrot

2020-02-23-115019_1600x900_scrot

@bszlrd
Copy link
Contributor

bszlrd commented Feb 23, 2020

@impaktor Yes, the font sise could be the same as in the list I think.

Module adjustments to make them compatible with the pigui Bulletin Board
Allow passing Table to PiguiFace constructor
Optional targetResolution parameter to allow rescaling ui into smaller windows
Cleanup unused variables
Add SwitchTo method to pigui tabview
Apply InfoFace refactoring to ShipRepairs and Police
Added body font to char-form
Fixed commodity-market font-resizing
Fixed dialog option crashes
Resetting market views
Fixed Fuel Club to work with the pigui Bulletin Board
Using pionillium font in the Bulletin Board chat form
Window Resizing fix
@vakhoir vakhoir force-pushed the feature/bulletin_board branch from 1dc5a20 to 339b08a Compare February 23, 2020 12:45
@vakhoir
Copy link
Contributor Author

vakhoir commented Feb 23, 2020

Sorry, the window resizing was brainfart. Should be good now.

I changed the font, but personally, I'm not convinced. It will be tricky to put the exact same size for the chat form as in the market. There's a lot of resizing magic there, and as a result the font size is non-standard. Let me know if you want to keep it this way or revert:

BB05

BB06

@impaktor impaktor merged commit 4d6218b into pioneerspacesim:master Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants