Skip to content

Commit e251849

Browse files
committed
Merge branch 'davidorok/uncategorized' of https://github.com/FlutterFlow/flutterflow-documentation into davidorok/uncategorized
2 parents c4b147a + 1794577 commit e251849

File tree

6 files changed

+93
-43
lines changed

6 files changed

+93
-43
lines changed

docs/ff-integrations/database/cloud-firestore/getting-started.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,39 @@ com/embed/v_hR4K4auoQ" frameborder="0" allow="accelerometer; autoplay; clipboard
9595

9696
:::
9797

98+
## Manage Databases
99+
100+
You can also create multiple Firestore databases within a single Firebase project. This is especially useful for enterprise use cases, for example, when managing region-based databases or supporting multiple clients with isolated data stores.
101+
102+
Additionally, you can use multiple databases to simulate different environments such as development, staging, and production. **However, note that** this setup is not directly related to the [Development Environments](../../../testing-deployment-publishing/development-environments/development-environments.md) in FlutterFlow, which operates independently of Firebase's multi-database configuration. This means that you’ll need to manually switch Firestore Database ID when switching Development Environments.
103+
104+
To create a new database, go to the **Firebase Console > Firestore Database** section. Click the button next to the default database, i.e, **Add database**. Choose a region and configure your security rules. Once the new database is created, you can switch between databases using the dropdown.
105+
106+
Next, copy the new **Database ID** and navigate to **FlutterFlow > Settings and Integrations > Firebase > Advanced Settings**. Paste the ID into the **Firestore Database ID** input field. Finally, regenerate the config file. Your app will now use the newly created database.
107+
108+
109+
<div style={{
110+
position: 'relative',
111+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
112+
height: 0,
113+
width: '100%'}}>
114+
<iframe
115+
src="https://demo.arcade.software/f2lDuL0yk5UlrjkNnfRF?embed&show_copy_link=true"
116+
title=""
117+
style={{
118+
position: 'absolute',
119+
top: 0,
120+
left: 0,
121+
width: '100%',
122+
height: '100%',
123+
colorScheme: 'light'
124+
}}
125+
frameborder="0"
126+
loading="lazy"
127+
webkitAllowFullScreen
128+
mozAllowFullScreen
129+
allowFullScreen
130+
allow="clipboard-write">
131+
</iframe>
132+
</div>
133+
<p></p>

docs/resources/projects/settings/project-apis.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ Authorization: Bearer YOUR_API_TOKEN_HERE
103103
## API Endpoints
104104
Below is a list of available API endpoints with their methods and usage descriptions.
105105

106-
| Endpoint | Method | Purpose |
107-
| --------------------------- | ------ | --------------------------------------------- |
108-
| `/listPartitionedFileNames` | GET | List available YAML file names for a project. |
109-
| `/l/listProjects` | POST | Retrieve metadata for all projects. |
110-
| `/projectYamls` | GET | Export/download YAML files from a project. |
111-
| `/validateProjectYaml` | POST | Validate YAML content before applying changes. |
112-
| `/updateProjectYaml` | POST | Update project configuration via YAML. |
106+
| Endpoint | Method | Purpose |
107+
| --------------------------- | ------ | --------------------------------------------- |
108+
| `/listPartitionedFileNames` | GET | List available YAML file names for a project. |
109+
| `/l/listProjects` | POST | Retrieve metadata for all projects. |
110+
| `/projectYamls` | GET | Export/download YAML files from a project. |
111+
| `/validateProjectYaml` | POST | Validate YAML content before applying changes. |
112+
| `/updateProjectByYaml` | POST | Update project configuration via YAML. |
113113

114114

115115
### List File Names
@@ -358,7 +358,7 @@ curl -X POST \
358358
This endpoint allows you to overwrite existing files in your FlutterFlow project by submitting updated YAML content.
359359

360360
#### Endpoint
361-
`POST /updateProjectYaml`
361+
`POST /updateProjectByYaml`
362362

363363
#### Request Body
364364
```jsx
@@ -413,7 +413,7 @@ This example updates the `ad-mob` file and adds/updates app state variables.
413413

414414
```jsx
415415
curl -X POST \
416-
'https://api.flutterflow.io/v2/updateProjectYaml' \
416+
'https://api.flutterflow.io/v2/updateProjectByYaml' \
417417
-H 'Authorization: Bearer YOUR_API_TOKEN' \
418418
-H 'Content-Type: application/json' \
419419
-d '{
@@ -462,7 +462,7 @@ First, we use the `/listPartitionedFileNames` endpoint to check if the `app-stat
462462
</div>
463463
<p></p>
464464

465-
Next, we open the `app-state.yaml` file and update the `enableDarkMode` variable by setting its `persisted` value to `true`. We then convert the updated YAML into a properly escaped single line string and validate it using the `/validateProjectYaml` endpoint. If validation succeeds, we send the final update using the `/updateProjectYaml` endpoint.
465+
Next, we open the `app-state.yaml` file and update the `enableDarkMode` variable by setting its `persisted` value to `true`. We then convert the updated YAML into a properly escaped single line string and validate it using the `/validateProjectYaml` endpoint. If validation succeeds, we send the final update using the `/updateProjectByYaml` endpoint.
466466

467467

468468
<div style={{
@@ -535,7 +535,7 @@ When YAML validation fails, you'll receive detailed error information:
535535
-d '{"projectId": "project-id", "fileKey": "ad-mob", "fileContent": "showTestAds: false"}'
536536
537537
# 2. If validation passes, apply the changes
538-
curl -X POST 'https://api.flutterflow.io/v2/updateProjectYaml' \
538+
curl -X POST 'https://api.flutterflow.io/v2/updateProjectByYaml' \
539539
-H 'Authorization: Bearer YOUR_API_KEY' \
540540
-H 'Content-Type: application/json' \
541541
-d '{"projectId": "project-id", "fileKeyToContent": {"ad-mob": "showTestAds: false"}}'

docs/testing-deployment-publishing/branching-collaboration/branching.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ toc_max_heading_level: 4
1111
# Branching
1212
Branching creates a separate copy of your work, so you can add new features without disrupting your current progress. It enables multiple developers or teams to work simultaneously on different features without interfering with each other.
1313

14-
Suppose you have an eCommerce app and you want to add a new feature, such as a product recommendation system. Instead of incorporating it directly into your `main` branch and potentially causing problems, you can create a branch to work on this new feature in isolation. Once it's complete, you can integrate it back into the `main` branch.
14+
Suppose you have an eCommerce app and you want to add a new feature, such as a product recommendation system. Instead of incorporating it directly into your existing `main` branch and potentially causing problems, you can create a branch to work on this new feature in isolation. Once it's complete, you can integrate it back into the `main` branch.
1515

1616
:::info
1717
While all users can access the branching menu and create commits, only **Pro**, **Teams**, and **Enterprise** plans support creating new branches.
@@ -28,12 +28,18 @@ FlutterFlow. You can also learn more about
2828
## Branching Overview
2929
Before you create and merge a branch, it is essential to understand the general workflow. Here's what it looks like:
3030

31-
![branching](../imgs/branching.avif)
31+
![branching](imgs/branching-overview.avif)
3232

33-
First, create a new branch from the `main` branch. After making your changes and finalizing the
34-
feature, merge this new branch back into the `main` branch. If there are any conflicts,
33+
First, create a new branch from the `main` branch. After making your changes in a new branch and finalizing the feature, merge this new branch back into the `main` branch. If there are any conflicts,
3534
you must resolve them first.
3635

36+
:::note
37+
It’s important to understand what merging actually means. Merging does not perform a "union" of data between branches. Instead, Git merge reconciles differences (diffs) between the branches. When you merge, Git compares the changes made in the new branch with the main branch and applies these changes directly.
38+
39+
For instance, if a branch is created and all existing data is deleted before new content is added, Git interprets this as a replacement. When the branch is merged back into the main branch, those deletions will also be applied removing the original data. This behaviour can be surprising to those expecting Git to automatically preserve all content from both branches. Learn more about [**Merging**](#merging).
40+
41+
To avoid accidental data loss, ensure that your branch workflow involves incremental and intentional changes rather than deleting and replacing all existing content unless that's specifically your goal.
42+
:::
3743

3844
## Creating a New Branch
3945
To create a new branch from the current branch, simply go to the **Branching Options** button next to current branch in the **Branching menu.**
@@ -177,12 +183,12 @@ You can also merge changes from the parent branch, into the current branch. For
177183

178184
![after-merging-2](../imgs/after-merging-2.png)
179185

180-
During a merge, FlutterFlow compares the changes made in both branches, if the changes don't overlap or conflict then the branches are automatically combined. If there are conflicts (for example, both branches modified the same widget property) you'll need to resolve these before the merge can be completed.
186+
During a merge, Git compares the changes made in both branches, if the changes don't overlap or conflict then the branches are automatically combined. If there are conflicts (for example, both branches modified the same widget property) you'll need to resolve these before the merge can be completed.
181187

182188
:::note Few things to note here
183189

184-
- At the moment, FlutterFlow only supports merging into the parent branch, or the branch that the current branch was created from (usually `main`)
185-
- Only the user who initiated the merge can access both the `main` branch and the branch during an ongoing merge.
190+
- At the moment, FlutterFlow only supports merging into the parent branch, or the branch that the current branch was created from.
191+
- Only the user who initiated the merge can access both the branches during an ongoing merge.
186192
- Merges result in a merge [commit](#commits), which means you can undo a merge by restoring the branch to a prior commit
187193
- If you leave the project during the merge and come back, the progress you have made on the merge will be preserved.
188194

Binary file not shown.

src/js/chatbot.js

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
(function() {
33
if (typeof window === 'undefined') return;
44

5+
// TEMPORARY DISABLE FLAG - Set to false to disable chatbot
6+
const CHATBOT_ENABLED = false;
7+
8+
if (!CHATBOT_ENABLED) {
9+
console.log('Chatbot is temporarily disabled');
10+
return;
11+
}
12+
513
// Set configuration
614
window.difyChatbotConfig = {
715
token: 'bYIppJMzMieMPDHm'
@@ -18,11 +26,11 @@
1826
style.textContent = `
1927
#dify-chatbot-bubble-button {
2028
background-color: #4B39EF !important;
21-
bottom: 0.25rem !important;
22-
right: 0.25rem !important;
29+
bottom: 0.80rem !important;
30+
right: 0.80rem !important;
2331
border-radius: 50% !important;
24-
width: 50px !important;
25-
height: 50px !important;
32+
width: 45px !important;
33+
height: 45px !important;
2634
}
2735
2836
/* Make the main chat window background more translucent to show rounded corners */
@@ -64,12 +72,13 @@
6472

6573
// Function to force positioning
6674
function forceChatbotPosition() {
67-
// Handle all possible widget states
68-
const allWidgets = document.querySelectorAll('.dify-chatbot-widget, [class*="dify"], [id*="dify"]');
69-
const allWindows = document.querySelectorAll('#dify-chatbot-bubble-window, [class*="chat"], [class*="window"]');
75+
// Only target specific chatbot elements with very specific selectors
76+
const chatbotWidgets = document.querySelectorAll('.dify-chatbot-widget, #dify-chatbot-widget');
77+
const chatbotWindows = document.querySelectorAll('#dify-chatbot-bubble-window, .dify-chatbot-bubble-window');
78+
const chatbotButtons = document.querySelectorAll('#dify-chatbot-bubble-button, .dify-chatbot-bubble-button');
7079

71-
// Position all widget containers
72-
allWidgets.forEach(widget => {
80+
// Position chatbot widget containers only
81+
chatbotWidgets.forEach(widget => {
7382
widget.style.position = 'fixed';
7483
widget.style.bottom = '0';
7584
widget.style.right = '0';
@@ -80,8 +89,8 @@
8089
widget.style.transform = 'none';
8190
});
8291

83-
// Position all window elements
84-
allWindows.forEach(window => {
92+
// Position chatbot window elements only
93+
chatbotWindows.forEach(window => {
8594
window.style.position = 'fixed';
8695
window.style.bottom = '0';
8796
window.style.right = '0';
@@ -91,9 +100,9 @@
91100
window.style.transform = 'none';
92101
});
93102

94-
// Also handle any iframe that might be created
95-
const iframes = document.querySelectorAll('iframe[src*="dify"], iframe[src*="udify"]');
96-
iframes.forEach(iframe => {
103+
// Handle chatbot iframes specifically
104+
const chatbotIframes = document.querySelectorAll('iframe[src*="dify"], iframe[src*="udify"]');
105+
chatbotIframes.forEach(iframe => {
97106
iframe.style.position = 'fixed';
98107
iframe.style.bottom = '0';
99108
iframe.style.right = '0';
@@ -103,9 +112,9 @@
103112
iframe.style.transform = 'none';
104113
});
105114

106-
// Special handling for expanded state - target any element that might be the expanded window
107-
const expandedElements = document.querySelectorAll('[data-state="expanded"], [class*="expanded"], [style*="position: fixed"]');
108-
expandedElements.forEach(element => {
115+
// Only target expanded chatbot elements
116+
const expandedChatbotElements = document.querySelectorAll('.dify-chatbot-widget[data-state="expanded"], .dify-chatbot-widget .expanded');
117+
expandedChatbotElements.forEach(element => {
109118
element.style.position = 'fixed';
110119
element.style.bottom = '0';
111120
element.style.right = '0';
@@ -116,9 +125,9 @@
116125
element.style.zIndex = '1000';
117126
});
118127

119-
// Also force any element with a high z-index to stay at bottom
120-
const highZIndexElements = document.querySelectorAll('[style*="z-index: 999"], [style*="z-index: 1000"], [style*="z-index: 1001"]');
121-
highZIndexElements.forEach(element => {
128+
// Only force positioning on chatbot elements with high z-index
129+
const highZIndexChatbotElements = document.querySelectorAll('.dify-chatbot-widget[style*="z-index: 999"], .dify-chatbot-widget[style*="z-index: 1000"], .dify-chatbot-widget[style*="z-index: 1001"]');
130+
highZIndexChatbotElements.forEach(element => {
122131
if (element.style.position === 'fixed') {
123132
element.style.bottom = '0';
124133
element.style.right = '0';
@@ -127,9 +136,9 @@
127136
}
128137
});
129138

130-
// Make background elements more translucent to show rounded corners
131-
const allElements = document.querySelectorAll('.dify-chatbot-widget *');
132-
allElements.forEach(element => {
139+
// Make chatbot background elements more translucent to show rounded corners
140+
const chatbotElements = document.querySelectorAll('.dify-chatbot-widget *');
141+
chatbotElements.forEach(element => {
133142
const computedStyle = window.getComputedStyle(element);
134143
// Look for dark backgrounds that are likely the main content area
135144
if (computedStyle.backgroundColor &&
@@ -147,8 +156,7 @@
147156
});
148157

149158
// Ensure chat button is circular
150-
const chatButtons = document.querySelectorAll('[id*="bubble-button"], [class*="bubble-button"]');
151-
chatButtons.forEach(button => {
159+
chatbotButtons.forEach(button => {
152160
button.style.borderRadius = '50%';
153161
button.style.width = '60px';
154162
button.style.height = '60px';

0 commit comments

Comments
 (0)