Skip to content

Commit 4ab0402

Browse files
[DR-420] update deprecation notice with link to announcement
1 parent e00df38 commit 4ab0402

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+152
-81
lines changed

docs/blocks/button.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ A button that increments a counter
163163
```tsx
164164
import { Devvit, useState } from '@devvit/public-api';
165165

166-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
166+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example. View the announcement below this example.
167167
Devvit.addCustomPostType({
168168
name: 'Say Hello',
169169
render: (context) => {
@@ -180,3 +180,4 @@ Devvit.addCustomPostType({
180180
},
181181
});
182182
```
183+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)

docs/blocks/image.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ A button that increments a counter
183183
```tsx
184184
import { Devvit, useState } from '@devvit/public-api';
185185

186-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
186+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
187+
187188
Devvit.addCustomPostType({
188189
name: 'Say Hello',
189190
render: (context) => {
@@ -200,6 +201,7 @@ Devvit.addCustomPostType({
200201
},
201202
});
202203
```
204+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
203205

204206
### Example
205207

docs/capabilities/blocks/app_image_assets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const render: Devvit.CustomPostComponent = () => {
6565
);
6666
};
6767

68-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
68+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
6969
Devvit.addCustomPostType({
7070
name: 'My custom post',
7171
description: 'Test custom post for showing a custom asset!',
@@ -86,6 +86,7 @@ Devvit.addMenuItem({
8686
},
8787
});
8888
```
89+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
8990

9091
4. Run `devvit upload`.
9192
5. Install or update your app on your subreddit.

docs/capabilities/blocks/dimensions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can use dimensions to:
1616
## Getting dimensions
1717

1818
:::warning Deprecation notice
19-
`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30.
19+
`addCustomPostType` is deprecated and will be unsupported. It will not work after June 30. [View announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
2020
:::
2121

2222
Dimension information is specified in density-independent pixels. These pixel units are located on the context object.
@@ -32,14 +32,15 @@ Dimension information is specified in density-independent pixels. These pixel un
3232
This example shows a custom post that specifies dimensions.
3333

3434
```tsx
35-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
35+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
3636
Devvit.addCustomPostType({
3737
name: 'Dimensions app',
3838
render: (context) => {
3939
return context.dimensions?.width < 300 ? <SmallApp /> : <BigApp />;
4040
},
4141
});
4242
```
43+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
4344

4445
This example shows that dimensions always references the root element, even if it’s in a child element. Although `MyHeader` is a component within the root element, this does not change the custom post dimensions provided in the context object.
4546

@@ -58,14 +59,15 @@ export const MyHeader: Devvit.BlockComponent = (props, context) => {
5859
);
5960
};
6061

61-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
62+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
6263
Devvit.addCustomPostType({
6364
name: 'Name',
6465
render: (_context) => {
6566
return <MyHeader />;
6667
},
6768
});
6869
```
70+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
6971

7072
## Limitations
7173

docs/capabilities/blocks/working_with_useasync.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,14 @@ const App = () => {
154154
};
155155

156156
//add your custom post
157-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
157+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
158158
Devvit.addCustomPostType({
159159
name: 'AppName',
160160
description: 'Using useAsync with XKCD API',
161161
render: App,
162162
});
163163
```
164+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
164165
165166
## When to use useAsync and useState
166167

docs/capabilities/blocks/working_with_useinterval.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function getCurrentTime() {
5959
return `${hours}:${minutes}:${seconds}`;
6060
}
6161

62-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
62+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
6363
Devvit.addCustomPostType({
6464
name: 'Clock',
6565
render: (context) => {
@@ -77,3 +77,4 @@ Devvit.addCustomPostType({
7777

7878
export default Devvit;
7979
```
80+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)

docs/capabilities/blocks/working_with_usestate.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,14 @@ const CountPage: Devvit.BlockComponent<Props> = ({ navigate, setCount, count },
144144
};
145145

146146
//add your custom post
147-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
147+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
148148
Devvit.addCustomPostType({
149149
name: 'AppName',
150150
description: 'Navigate between pages and count!',
151151
render: App,
152152
});
153153
```
154+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
154155

155156
In this example, when a user session ends, state will no longer be available to the app. To save and persist data between sessions you will need to [store data server-side via the Redis](../server/redis).
156157

docs/capabilities/client/forms.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ A form lets your app ask users to input and submit data. Forms can be defined wi
7777
import { Devvit, useState, useForm } from '@devvit/public-api';
7878

7979
// Interactive post with form
80-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
80+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
8181
Devvit.addCustomPostType({
8282
name: 'FormExample',
8383
render: (context) => {
@@ -139,6 +139,7 @@ A form lets your app ask users to input and submit data. Forms can be defined wi
139139
},
140140
});
141141
```
142+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
142143

143144
### Methods
144145

@@ -1049,7 +1050,7 @@ Below is a collection of common use cases and patterns.
10491050
redditAPI: true,
10501051
});
10511052

1052-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
1053+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
10531054
Devvit.addCustomPostType({
10541055
name: 'Multi-step Form',
10551056
render: (context) => {
@@ -1133,6 +1134,7 @@ Below is a collection of common use cases and patterns.
11331134
},
11341135
});
11351136
```
1137+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
11361138
</TabItem>
11371139
</Tabs>
11381140

docs/capabilities/client/navigation.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ When linking to Reddit content, the navigation function requires the app account
9393
});
9494

9595
// Interactive post with navigation
96-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
96+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
9797
Devvit.addCustomPostType({
9898
name: 'Navigation Post',
9999
render: (context) => {
@@ -132,6 +132,7 @@ When linking to Reddit content, the navigation function requires the app account
132132
},
133133
});
134134
```
135+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
135136

136137
### Parameters
137138

docs/capabilities/client/overview.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Client-side effects enable your Devvit app to provide interactive feedback and n
4646
import { Devvit } from '@devvit/public-api';
4747

4848
// In a custom post component
49-
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30.
49+
// addCustomPostType() is deprecated and will be unsupported. It will not work after June 30. View the announcement below this example.
5050
Devvit.addCustomPostType({
5151
name: 'Interactive Post',
5252
render: (context) => {
@@ -82,6 +82,7 @@ Client-side effects enable your Devvit app to provide interactive feedback and n
8282
},
8383
});
8484
```
85+
[View `addCustomPostType` deprecation announcement.](https://www.reddit.com/r/Devvit/comments/1r3xcm2/devvit_web_and_the_future_of_devvit/)
8586

8687
</TabItem>
8788
</Tabs>

0 commit comments

Comments
 (0)