Skip to content

Commit eb65e81

Browse files
author
Vivek Kozhisseri
committed
Revert "Reactnative/handle vertical content alignment (#4)"
This reverts commit f759c88.
1 parent f759c88 commit eb65e81

File tree

7 files changed

+7
-176
lines changed

7 files changed

+7
-176
lines changed

source/community/reactnative/__test__/__snapshots__/adaptive-card.test.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ exports[`renders correctly 1`] = `
2626
"borderColor": undefined,
2727
"borderWidth": 0,
2828
},
29+
Object {
30+
"padding": 5,
31+
},
2932
],
3033
Array [
3134
Object {

source/community/reactnative/src/components/containers/container-wrapper.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,15 @@ export class ContainerWrapper extends React.PureComponent {
7575
);
7676
switch (verticalContentAlignment) {
7777
case Enums.VerticalAlignment.Center:
78-
computedStyles.push({ flex:1, justifyContent: Constants.CenterString });
78+
computedStyles.push({ justifyContent: Constants.CenterString });
7979
break;
8080
case Enums.VerticalAlignment.Bottom:
81-
computedStyles.push({ flex:1, justifyContent: Constants.FlexEnd });
81+
computedStyles.push({ justifyContent: Constants.FlexEnd });
8282
break;
8383
default:
84-
computedStyles.push({ flex:1, justifyContent: Constants.FlexStart });
84+
computedStyles.push({ justifyContent: Constants.FlexStart });
8585
break;
8686
}
87-
//Constructing the vertical Content Alignment for nested containers
88-
if(this.payload.parent.type === Constants.TypeContainer && this.payload.type === Constants.TypeContainer) {
89-
this.payload.verticalContentAlignment = this.payload.parent["verticalContentAlignment"];
90-
}
9187
} else {
9288
// vertical content alignment - Default is top
9389
computedStyles.push({ justifyContent: Constants.FlexStart });

source/community/reactnative/src/components/elements/element-wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default class ElementWrapper extends React.Component {
5959

6060
let computedStyles = [styles.inputContainer, receivedStyles];
6161

62-
if (payload.parent && payload.parent["verticalContentAlignment"] && payload.type !== Constants.TypeColumnSet) {
62+
if (payload.parent && payload.parent["verticalContentAlignment"] && payload.parent.type === Constants.TypeColumn) {
6363
// vertical content alignment
6464
let verticalContentAlignment = Utils.parseHostConfigEnum(
6565
Enums.VerticalAlignment,

source/community/reactnative/src/utils/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export const TypeAdaptiveCard = "AdaptiveCard";
6464
export const TypeTextBlock = "TextBlock";
6565
export const TypeRichTextBlock = "RichTextBlock";
6666
export const TypeColumn = "Column";
67-
export const TypeContainer = "Container";
6867

6968
export const TypeString = "string";
7069
export const TypeObject = "object"

source/community/reactnative/src/visualizer/payloads/data-binding/VerticalContentAlignment_Container.json

Lines changed: 0 additions & 134 deletions
This file was deleted.

source/community/reactnative/src/visualizer/payloads/data-binding/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,5 @@ export default payloads = [
1414
{
1515
"title": "Stock Update",
1616
"json": require('./stock-update.json')
17-
},
18-
{
19-
"title": "Vertical Alignment Container",
20-
"json": require('./VerticalContentAlignment_Container.json')
2117
}
2218
]

source/community/reactnative/src/visualizer/renderer.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -115,35 +115,6 @@ export default class Renderer extends React.Component {
115115
{ "key": "List", "value": "Backlog" },
116116
{ "key": "Assigned to", "value": "Matt Hidinger" },
117117
{ "key": "Due date", "value": "Not set" }
118-
],
119-
"cafeName": "Cafe 34",
120-
"cafeDescription": "Open Mon-Fri from 9am - 2pm",
121-
"cafeteriaImage": "https://th.bing.com/th/id/R.f70650f59a71616da0d8f4b5c73e9f60?rik=g02xYdIzQX5Img&riu=http%3a%2f%2fwww.designtechnikblog.ch%2fwp-content%2fuploads%2f2018%2f02%2f7486f09c-1dce-478b-99aa-0a142c9e9165.jpg&ehk=wNERHkKGpde%2bmt9lefTeLF88%2br6OFdhUKNG8oEExDg8%3d&risl=&pid=ImgRaw&r=0",
122-
"menu":[
123-
{
124-
"image": "https://i.pinimg.com/originals/22/28/af/2228afa177aa08b6664c76bd9d7ec56c.jpg",
125-
"station": "Station 1",
126-
"name": "Korean",
127-
"description": "Chili Pickled Cabbage, Pork Bulgogi, Korean Barbecue, Fried..."
128-
},
129-
{
130-
"image": "https://th.bing.com/th/id/R.611dd20fbfc894b973b662498027721f?rik=Ev8dUaRZCrpnTg&riu=http%3a%2f%2fdimondcafeoakland.com%2fuploads%2f3%2f4%2f7%2f7%2f34778011%2f8770113.jpg&ehk=ZSUEdr0fuSpjM22rivCpa7O8UlMNQfRozIW9UKogB1o%3d&risl=&pid=ImgRaw&r=0",
131-
"station": "Station 2",
132-
"name": "Mexican",
133-
"description": "Enchiladas, Street tacos, Guacamole"
134-
},
135-
{
136-
"image": "https://th.bing.com/th/id/OIP.NqBIh7UiCM7KRxnn6ijgRwAAAA?pid=ImgDet&rs=1",
137-
"station": "Station 3",
138-
"name": "Grille",
139-
"description": "Selection of burgers, French fries, Fountain drinks."
140-
},
141-
{
142-
"image": "https://th.bing.com/th/id/OIP.gHJJCykFexBZTex15nhCPAAAAA?pid=ImgDet&w=300&h=300&rs=1",
143-
"station": "Station 3",
144-
"name": "in.gredients",
145-
"description": "Enchiladas, Street tacos, Guacamole"
146-
}
147118
]
148119
}
149120
}

0 commit comments

Comments
 (0)