Skip to content

Commit f9a3468

Browse files
jimmyleeexpbot
authored andcommitted
fixes table styles and then moves away from a graphic for push notifications
fbshipit-source-id: 35b2d76
1 parent 05219b5 commit f9a3468

File tree

3 files changed

+43
-23
lines changed

3 files changed

+43
-23
lines changed

global-styles/tables.js

+19-15
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,35 @@ import * as Constants from '~/common/constants';
33
export const globalTables = `
44
table {
55
margin-bottom: 1rem;
6-
font-size: 1rem;
7-
line-height: 1.45rem;
6+
font-size: 0.8rem;
7+
line-height: 1.2rem;
88
border-collapse: collapse;
9-
border: 1px solid hsla(0,0%,0%,0.12);
9+
border: 1px solid ${Constants.colors.border};
10+
border-radius: 4px;
1011
width: 100%;
1112
}
1213
1314
thead {
15+
border-radius: 4px 4px 0 0;
1416
text-align: left;
1517
}
1618
17-
th, td {
19+
td, th {
20+
padding: 16px;
21+
border-bottom: 1px solid ${Constants.colors.border};
22+
border-right: 1px solid ${Constants.colors.border};
23+
24+
:last-child {
25+
border-right: 0px;
26+
}
27+
}
28+
29+
td {
1830
text-align: left;
19-
border-bottom: 1px solid hsla(0,0%,0%,0.12);
20-
font-feature-settings: "tnum";
21-
-moz-font-feature-settings: "tnum";
22-
-ms-font-feature-settings: "tnum";
23-
-webkit-font-feature-settings: "tnum";
24-
padding-left: 0.96667rem;
25-
padding-right: 0.96667rem;
26-
padding-top: 0.725rem;
27-
padding-bottom: calc(0.725rem - 1px);
2831
}
2932
3033
th {
31-
font-weight: bold;
34+
font-family: ${Constants.fontFamilies.bold};
35+
font-weight: 400;
3236
}
33-
`.replace(/\s/g, '');
37+
`;

versions/unversioned/guides/push-notifications.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ export default class AppContainer extends React.Component {
130130

131131
It's not entirely clear from the above when your app will be able to handle the notification depending on it's state at the time the notification is received. For clarification, see the following table:
132132

133-
![Timing of notifications](./receiving-push.png)
133+
| Push was received when... | Android | iOS |
134+
| ------------------------------------------------|:-----------------:| -----------------:|
135+
| App is open and foregrounded | Exponent.notification: origin: "received", data: Object | Same as Android
136+
| App is open and backgrounded | Can only be handled if the notification is selected. If it is dismissed, app cannot know it was received. | Same as Android
137+
| App is open and backgrounded, then foregrounded by selecting the notification | Exponent.notification: origin: "selected" | Exponent.notification: origin: "received" |
138+
| App was not open, and then opened by selecting the push notification | Passed as props.exp.notification on app root component | props.exp.notification: origin: "selected" | props.exp.notification | props.exp.notification: origin: "received" |
139+
| App was not open, and then opened by tapping the home screen icon | Can only be handled if the notification is selected. If it is dismissed, the app cannot know it was received. | Same as Android
134140

135141
## HTTP/2 API
136142

@@ -140,9 +146,11 @@ Although there are server-side SDKs in several languages to help you send push n
140146

141147
Send a POST request to `https://exp.host/--/api/v2/push/send` with the following HTTP headers:
142148

143-
accept: application/json
144-
accept-encoding: gzip, deflate
145-
content-type: application/json
149+
```
150+
accept: application/json
151+
accept-encoding: gzip, deflate
152+
content-type: application/json
153+
```
146154

147155
This API currently does not require any authentication.
148156

versions/v27.0.0/guides/push-notifications.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ export default class AppContainer extends React.Component {
130130

131131
It's not entirely clear from the above when your app will be able to handle the notification depending on it's state at the time the notification is received. For clarification, see the following table:
132132

133-
![Timing of notifications](./receiving-push.png)
133+
| Push was received when... | Android | iOS |
134+
| ------------------------------------------------|:-----------------:| -----------------:|
135+
| App is open and foregrounded | Exponent.notification: origin: "received", data: Object | Same as Android
136+
| App is open and backgrounded | Can only be handled if the notification is selected. If it is dismissed, app cannot know it was received. | Same as Android
137+
| App is open and backgrounded, then foregrounded by selecting the notification | Exponent.notification: origin: "selected" | Exponent.notification: origin: "received" |
138+
| App was not open, and then opened by selecting the push notification | Passed as props.exp.notification on app root component | props.exp.notification: origin: "selected" | props.exp.notification | props.exp.notification: origin: "received" |
139+
| App was not open, and then opened by tapping the home screen icon | Can only be handled if the notification is selected. If it is dismissed, the app cannot know it was received. | Same as Android
134140

135141
## HTTP/2 API
136142

@@ -140,9 +146,11 @@ Although there are server-side SDKs in several languages to help you send push n
140146

141147
Send a POST request to `https://exp.host/--/api/v2/push/send` with the following HTTP headers:
142148

143-
accept: application/json
144-
accept-encoding: gzip, deflate
145-
content-type: application/json
149+
```
150+
accept: application/json
151+
accept-encoding: gzip, deflate
152+
content-type: application/json
153+
```
146154

147155
This API currently does not require any authentication.
148156

0 commit comments

Comments
 (0)