I am trying to make a wireframe using the salt diagram type of plantuml, but I noticed it doesn't have the default spinner component.
How could that effect be achieved?
starting code
#startuml
salt
{
{^"Compra"
Número de boletos: |"5"
}
Total: $0.00
[Pagar]
}
#enduml
This is what I have accomplished so far and it looks pretty consistent:
#startuml
salt
{
{^"Compra"
Número de boletos:| {+5|<&caret-top>
.|<&caret-bottom>}
}
Total: $0.00
[Pagar]
}
#enduml
Basically I use the braces to put two lines with their up arrow and down arrow icons respectively
Related
Say I have a game scene, CarLevelScene which is a level where I have to drive a car a certain distance. I have a "distance remaining" gauge in one corner of the scene and a "fuel remaining" gauge in another corner. In favor of single responsibility, I want to extract this from the CarLevelScene js file. In addition, on update, both of these gauges depend on some shared data (since fuel depends on distance traveled).
Right now, I essentially do something like this:
let fuelGuageState;
let distanceGuageState;
export default class CarLevelScene {
init() {
fuelGuageState = new FuelGuageState(this); // have to pass in this to create game objects in the scene. Or do I?
distanceGuageState = new DistanceGuageState(this);
}
create() {
fuelGuageState.create();
distanceGuageState.create();
}
update() {
...
let distance = someCalc(...); // possibly from some distance model object
let fuel = someOtherCalc(distance, ...);
fuelGaugeState.update(fuel);
distanceGaugeState.update(distance);
}
}
My question is, is this the conventional way to create and use components in Phaser 3? Essentially, it would make the scene an organizer of components that simply feed the correct data to each update method. It feels a bit smelly. There's temporal coupling and a lot of dependency management.
Are there official docs that deal with the appropriate organization of components in code?
I don't understand the way Bixby retains data from previous NL Input. The following example uses the capsule capsule-sample-shirt.
I first use the NL input find 2 medium shirts to get a list of shirts.
I click on any of those (here i use the Collar Dress Shirt), and Bixby asks if I would want to buy it.
I click No and Bixby informs me with a Okay, I won't do that.
I now immediately run again the same NL input find 2 medium shirts and expect Bixby again to present me with the list of shirts, just like the first time. Instead of the expected list of shirts now, Bixby asks me again Are you sure you want to buy this? with the Collar Dress Shirt that I previously selected.
Why is Bixby not showing the list of shirts the second time find 2 medium shirts is given as NL input? What would need to happen to make Bixby show the list with this NL input after the first time?
List of shirts after NL Input:
Bixby waits for confirmation:
Bixby saying it canceled the prompt:
Bixby doesn't show the list but instead immediately asks for confirmation:
This is the AI part about Bixby.
Each conversation (utterance) without pressing the reset key is considered a continuation of last utterance (if any). Thus make the choice of Collar Dress and cancel it, but later ask to find 2 medium shirts again, Bixby will try to fill-in the blank with last choice user made.
One clear issue is that now has no way to change the type of shirt unless reset, but fix would be easy, make the image of shirt clickable and link actions in view model Confirmation.view.bxb
image-card {
aspect-ratio (4:3)
image-url ("[#{value(item.shirt.images[0].url)}]")
title-area {
halign (Start)
slot1 {
text {
value ("")
style (Title_M)
}
}
}
// Add on-click here
}
You can add on-click similar to change the size and quantity
input-cell {
label ("Quantity")
value ("#{value(item.quantity)}")
on-click {
//This intent relies on searchTerm matching the item which is not a good practice, a better approach
//was to allow an ID as input to SelectItem and use `this.id` in the intent
intent {
goal {
UpdateOrder
#context (Continuation) { Order }
}
value { SearchTerm$expr(item.shirt.title) }
route { GetQuantity }
}
}
}
You may need to add other models to properly promote user.
Hope this will help, and have fun with Bixby!
The user says: "Show me Chinese menu"
I have used cell area to show food items because this is the layout I wanted in my card (vertical and small image).
However, because I have more than 80 items to list down, is it possible that first I show the user ten items and then a "Show More..." button?
If the user clicks on the "Show More Button", either I should open the menu in a different result-view or list down the rest menu in the same page hiding the "Show More..." button.
I know image-list has the option but the image is little big compare to cell-area image and showing it horizontally, where I wanted it vertically.
Scenario 2:
User: where is Pizzahut in my area
in my detail page, bixby will show one store with image, below image will be the location with map, below that will be the list of menu. So three blocks into the results. first block is compound-card, second block is map-card and third block is cell-area. Now third block which is the menu has more than 20 items and i am listing it down. I want it to show like 5 items and one show more link and as soon as user click one the show more link, rest of the menu will drop there or I can redirect it to one new page with list of all the menu... whatever is possible.
For a large set of results, the best way would be for you to use navigation-mode.
navigation-mode {
read-many-and-next {
underflow-statement (This is the first page of results)
list-summary ("I have #{size(this)} results")
overflow-statement (That's all I have)
overflow-question (What would you like to do?)
next-page-question (Do you want the next page?)
page-size (10)
}
}
This ensures that you give the user a paginated view of your results so the user can consume them piecemeal rather than getting overwhelmed with 2 sets of results (first 10 and then the next 70).
Adding information to account for modified question
The highlights functionality would've worked in a simpler view but for your more complex view, I would recommend manually adding 5 iterations of menu items to display the first 5 items followed by a card with an on-click that pulls the whole menu and displays it in a separate result-view. I've added a code sample below with some placeholder concepts and actions.
Code sample:
single-line {
text {
style (Title_S)
value ("#{value(menu[0])}")
}
}
divider
single-line {
text {
style (Title_S)
value ("#{value(restaurant.menu[1])}")
}
}
divider
single-line {
text {
style (Title_S)
value ("#{value(restaurant.menu[2])}")
}
}
divider
single-line {
text {
style (Title_S)
value ("#{value(restaurant.menu[3])}")
}
}
divider
single-line {
text {
style (Title_S)
value ("#{value(restaurant.menu[4])}")
}
}
divider
cell-card {
slot2 {
content {
order (PrimarySecondary)
primary {
template ("See Full Menu")
}
}
}
on-click {
intent {
goal:GetFullMenu
value-set: RestaurantName ("#{value(restaurant.name)}")
}
}
}
In Scout Eclipse with every field comes label for it. But my problem is that is a lot of free space there and because of that fields are smaller that they should be.
For example :
I tried :
To set label width in pixel: It works, but you should set and calculate it for every field and you can forget about translations, because text don't have same size in other languages.
To set Label Horizontal Alignment to Right - text is positioned by fields but then free space is on the left side.
How to handle that?
P.S.
I don't need label without any free space, but with smaller one.
EDIT :
With spy tool it look like :
I have no idea what your problem really is, here some generic advices I can give you (based on some guesses I have made. I will be happy to extend this answer, when I know more about your use case).
From-To fields:
When you have 2 fields for “From” and “To”, a good practice is to use a sequence box.
Here an example for a “from-to date” sequence box (taken in the Widgets Demo Application):
#Order(50.0)
public class DateBox extends AbstractSequenceBox {
#Override
protected String getConfiguredLabel() {
return TEXTS.get("DateColumn");
}
#Order(10.0)
public class DateFrom extends AbstractDateField {
#Override
protected String getConfiguredLabel() {
return TEXTS.get("from");
}
}
#Order(20.0)
public class DateTo extends AbstractDateField {
#Override
protected String getConfiguredLabel() {
return TEXTS.get("to");
}
}
}
Money field:
We have discussed how you can combine an amount and currency field in a sequence box in order to look like this.
See this solution: Amount and currency field.
I have a SVG map of france in my webpage and every district is a polygon, I need that when I click a district the color change and stay that way until I click it again
this is my code
function init(evt) {
if ( window.svgDocument == null ) {
svgDoc = evt.target.ownerDocument;
}
function update(district){
$(this).find("path, polygon, circle").attr("fill", "#0d0");<- what is wrong
}
this is one of my polygons
<path id="14" d="M82.387,173.009L109.168,141h2.42l3.33-5.965l20.425,8.818l5.296,0.475l-
1.876,31.861l5.236,7.5v8.018 l-15.6-1.701l
0.273-3.599C128.127,186.407,99.635,180.95,82.387,173.009z" fill="#CCCCCC"
onclick="update('14')">
as you can see Im getting the onclick event the problem is I cant get the polygon to change color.
thanks in advance.
Check what this holds. A console.log(this) will make your life so much more easier
I'll answer 1. This will point to the window object when a function is called. So doing a $(this).attr will find the attributes in the window object and not in the object that you expect.
Since you're passing the object id in the function, you can use that to find the element in your document. You can do something like:
$('#'+ubicacion).attr("fill","blue")
Fiddle here.