You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this pr adds a 'hover over images to expand' behavior. the following
changes were made to the original code:
## original lightbox src component:
- original lightbox component handled the display of images with
alignment and collapsing features.
- used props for customization but did not have any interactive behavior
like hover effects or handling of scrolling events.
## updates to lightbox src component:
- added state variables : `isHovered`, `expandImage`, and `isScrolling`.
- `isHovered`: tracks if the mouse is hovering over image.
- `expandImage`: identifies if the image should expand.
- `isScrolling`: helps indicate whether page is currently being
scrolled. (to avoid pop ups when a user is reading)
- implemented a hover effect that expands the image
(`setExpandImage(true)` after a delay (300 milliseconds), but only if
the page is not being scrolled (!isScrolling).
- added a `handleScroll` function to update the `isScrolling` state when
the user scrolls. This function also cancels the image expansion
(`setExpandImage(false)`) and resets `isScrolling` after a delay.
- added event listeners for mouse enter (`onMouseEnter`) and mouse leave
(`onMouseLeave`) to control the hover state (`setIsHovered`).
- attached a scroll event listener to the window in a `useEffect` hook
to trigger `handleScroll`
- modified the `handleMouseEnter` to include a delay (matching the
scroll delay) before setting `isHovered` to true. This ensures that
hover effects are not activated immediately after scrolling stops.
- adjusted the component structure and styling to accommodate the new
hover and scroll behaviors. this means the image now scales (transform:
'scale(1.2)') with a smooth transition (transition: 'transform 0.5s
ease') when hovered, and the zIndex is increased to '9999' during
expansion.
- added a default width to `80%` to all images (using lightbox src
component) to ensure the scale was consistent across images and improve
accessibility. adding widths also helps with page load and SEO.
## images
- also adjusted widths for images that a large width attribute assigned.
this is to ensure it scaled correctly without affecting the user UX.
Copy file name to clipboardExpand all lines: website/blog/2023-04-18-building-a-kimball-dimensional-model-with-dbt.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ Now that you’ve set up the dbt project, database, and have taken a peek at the
185
185
186
186
Identifying the business process is done in collaboration with the business user. The business user has context around the business objectives and business processes, and can provide you with that information.
187
187
188
-
<Lightboxsrc="/img/blog/2023-04-18-building-a-kimball-dimensional-model-with-dbt/conversation.png"width="65%"title="Conversation between business user and analytics engineer"/>
188
+
<Lightboxsrc="/img/blog/2023-04-18-building-a-kimball-dimensional-model-with-dbt/conversation.png"title="Conversation between business user and analytics engineer"/>
189
189
190
190
Upon speaking with the CEO of AdventureWorks, you learn the following information:
Copy file name to clipboardExpand all lines: website/docs/docs/cloud/dbt-cloud-ide/ide-user-interface.md
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The [dbt Cloud IDE](/docs/cloud/dbt-cloud-ide/develop-in-the-cloud) is a tool fo
10
10
11
11
This page offers comprehensive definitions and terminology of user interface elements, allowing you to navigate the IDE landscape with ease.
12
12
13
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-basic-layout.jpg"width="100%"title="The Cloud IDE layout includes version control on the upper left, files/folders on the left, editor on the right an command/console at the bottom"/>
13
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-basic-layout.jpg"width="90%"title="The Cloud IDE layout includes version control on the upper left, files/folders on the left, editor on the right an command/console at the bottom"/>
14
14
15
15
## Basic layout
16
16
@@ -36,7 +36,7 @@ The IDE streamlines your workflow, and features a popular user interface layout
36
36
* Added (A) — The IDE detects added files
37
37
* Deleted (D) — The IDE detects deleted files.
38
38
39
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-command-bar.jpg"width="120%"title="Use the Command bar to write dbt commands, toggle 'Defer', and view the current IDE status"/>
39
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-command-bar.jpg"width="90%"title="Use the Command bar to write dbt commands, toggle 'Defer', and view the current IDE status"/>
40
40
41
41
5.**Command bar —** The Command bar, located in the lower left of the IDE, is used to invoke [dbt commands](/reference/dbt-commands). When a command is invoked, the associated logs are shown in the Invocation History Drawer.
42
42
@@ -49,7 +49,7 @@ The IDE streamlines your workflow, and features a popular user interface layout
49
49
50
50
The IDE features some delightful tools and layouts to make it easier for you to write dbt code and collaborate with teammates.
51
51
52
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-editing.jpg"width="100%"title="Use the file editor, version control section, and save button during your development workflow"/>
52
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-editing.jpg"width="90%"title="Use the file editor, version control section, and save button during your development workflow"/>
53
53
54
54
1.**File Editor —** The File Editor is where users edit code. Tabs break out the region for each opened file, and unsaved files are marked with a blue dot icon in the tab view.
55
55
@@ -66,24 +66,24 @@ The IDE features some delightful tools and layouts to make it easier for you to
66
66
## Additional editing features
67
67
68
68
-**Minimap —** A Minimap (code outline) gives you a high-level overview of your source code, which is useful for quick navigation and code understanding. A file's minimap is displayed on the upper-right side of the editor. To quickly jump to different sections of your file, click the shaded area.
69
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-minimap.jpg"width="100%"title="Use the Minimap for quick navigation and code understanding"/>
69
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-minimap.jpg"width="90%"title="Use the Minimap for quick navigation and code understanding"/>
70
70
71
71
-**dbt Editor Command Palette —** The dbt Editor Command Palette displays text editing actions and their associated keyboard shortcuts. This can be accessed by pressing `F1` or right-clicking in the text editing area and selecting Command Palette.
72
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-editor-command-palette-with-save.jpg"width="100%"title="Click F1 to access the dbt Editor Command Palette menu for editor shortcuts"/>
72
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-editor-command-palette-with-save.jpg"width="90%"title="Click F1 to access the dbt Editor Command Palette menu for editor shortcuts"/>
73
73
74
74
-**Git Diff View —** Clicking on a file in the **Changes** section of the **Version Control Menu** will open the changed file with Git Diff view. The editor will show the previous version on the left and the in-line changes made on the right.
75
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-git-diff-view-with-save.jpg"width="100%"title="The Git Diff View displays the previous version on the left and the changes made on the right of the Editor"/>
75
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-git-diff-view-with-save.jpg"width="90%"title="The Git Diff View displays the previous version on the left and the changes made on the right of the Editor"/>
76
76
77
77
-**Markdown Preview console tab —** The Markdown Preview console tab shows a preview of your .md file's markdown code in your repository and updates it automatically as you edit your code.
-**CSV Preview console tab —** The CSV Preview console tab displays the data from your CSV file in a table, which updates automatically as you edit the file in your seed directory.
81
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-csv.jpg"width="100%"title="View csv code in the CSV Preview console tab below the Editor tab."/>
81
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-csv.jpg"width="90%"title="View csv code in the CSV Preview console tab below the Editor tab."/>
82
82
83
83
## Console section
84
84
85
85
The console section, located below the File editor, includes various console tabs and buttons to help you with tasks such as previewing, compiling, building, and viewing the <Termid="dag" />. Refer to the following sub-bullets for more details on the console tabs and buttons.
86
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-console-overview.jpg"width="100%"title="The Console section is located below the File editor and has various tabs and buttons to help execute tasks"/>
86
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-console-overview.jpg"width="90%"title="The Console section is located below the File editor and has various tabs and buttons to help execute tasks"/>
87
87
88
88
1.**Preview button —** When you click on the Preview button, it runs the SQL in the active file editor regardless of whether you have saved it or not and sends the results to the **Results** console tab. You can preview a selected portion of saved or unsaved code by highlighting it and then clicking the **Preview** button.
89
89
@@ -107,17 +107,17 @@ Starting from dbt v1.6 or higher, when you save changes to a model, you can comp
107
107
3.**Format button —** The editor has a **Format** button that can reformat the contents of your files. For SQL files, it uses either `sqlfmt` or `sqlfluff`, and for Python files, it uses `black`.
108
108
109
109
5.**Results tab —** The Results console tab displays the most recent Preview results in tabular format.
110
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/results-console-tab.jpg"width="100%"title="Preview results show up in the Results console tab"/>
110
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/results-console-tab.jpg"width="90%"title="Preview results show up in the Results console tab"/>
111
111
112
112
6.**Compiled Code tab —** The Compile button triggers a compile invocation that generates compiled code, which is displayed in the Compiled Code tab.
113
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/compiled-code-console-tab.jpg"width="100%"title="Compile results show up in the Compiled Code tab"/>
113
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/compiled-code-console-tab.jpg"width="90%"title="Compile results show up in the Compiled Code tab"/>
114
114
115
115
7.**Lineage tab —** The Lineage tab in the File Editor displays the active model's lineage or <Termid="dag" />. By default, it shows two degrees of lineage in both directions (`2+model_name+2`), however, you can change it to +model+ (full DAG).
116
116
- Double-click a node in the DAG to open that file in a new tab
117
117
- Expand or shrink the DAG using node selection syntax.
118
118
- Note, the `--exclude` flag isn't supported.
119
119
120
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/lineage-console-tab.jpg"width="100%"title="View resource lineage in the Lineage tab"/>
120
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/lineage-console-tab.jpg"width="90%"title="View resource lineage in the Lineage tab"/>
121
121
122
122
## Invocation history
123
123
@@ -128,7 +128,7 @@ You can open the drawer in multiple ways:
128
128
- Typing a dbt command and pressing enter
129
129
- Or pressing Control-backtick (or Ctrl + `)
130
130
131
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-inv-history-drawer.jpg"width="100%"title="The Invocation History Drawer returns a log and detail of all your dbt Cloud invocations."/>
131
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-inv-history-drawer.jpg"width="90%"title="The Invocation History Drawer returns a log and detail of all your dbt Cloud invocations."/>
132
132
133
133
1.**Invocation History list —** The left-hand panel of the Invocation History Drawer displays a list of previous invocations in the IDE, including the command, branch name, command status, and elapsed time.
134
134
@@ -138,7 +138,7 @@ You can open the drawer in multiple ways:
138
138
139
139
4.**Command Control button —** Use the Command Control button, located on the right side, to control your invocation and cancel or rerun a selected run.
140
140
141
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-results.jpg"width="100%"title="The Invocation History list displays a list of previous invocations in the IDE"/>
141
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-results.jpg"width="90%"title="The Invocation History list displays a list of previous invocations in the IDE"/>
142
142
143
143
5.**Node Summary tab —** Clicking on the Results Status Tabs will filter the Node Status List based on their corresponding status. The available statuses are Pass (successful invocation of a node), Warn (test executed with a warning), Error (database error or test failure), Skip (nodes not run due to upstream error), and Queued (nodes that have not executed yet).
144
144
@@ -150,25 +150,25 @@ You can open the drawer in multiple ways:
150
150
## Modals and Menus
151
151
Use menus and modals to interact with IDE and access useful options to help your development workflow.
152
152
153
-
-**Editor tab menu —** To interact with open editor tabs, right-click any tab to access the helpful options in the file tab menu.<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/editor-tab-menu-with-save.jpg"width="100%"title=" Right-click a tab to view the Editor tab menu options"/>
153
+
-**Editor tab menu —** To interact with open editor tabs, right-click any tab to access the helpful options in the file tab menu.<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/editor-tab-menu-with-save.jpg"width="90%"title=" Right-click a tab to view the Editor tab menu options"/>
154
154
155
155
-**File Search —** You can easily search for and navigate between files using the File Navigation menu, which can be accessed by pressing Command-O or Control-O or clicking on the 🔍 icon in the File Explorer.
156
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-file-search-with-save.jpg"width="100%"title="The Command History returns a log and detail of all your dbt Cloud invocations."/>
156
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-file-search-with-save.jpg"width="90%"title="The Command History returns a log and detail of all your dbt Cloud invocations."/>
157
157
158
158
-**Global Command Palette—** The Global Command Palette provides helpful shortcuts to interact with the IDE, such as git actions, specialized dbt commands, and compile, and preview actions, among others. To open the menu, use Command-P or Control-P.
159
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-global-command-palette-with-save.jpg"width="100%"title="The Command History returns a log and detail of all your dbt Cloud invocations."/>
159
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-global-command-palette-with-save.jpg"width="90%"title="The Command History returns a log and detail of all your dbt Cloud invocations."/>
160
160
161
161
-**IDE Status modal —** The IDE Status modal shows the current error message and debug logs for the server. This also contains an option to restart the IDE. Open this by clicking on the IDE Status button.
162
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-status-modal-with-save.jpg"width="100%"title="The Command History returns a log and detail of all your dbt Cloud invocations."/>
162
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-status-modal-with-save.jpg"width="90%"title="The Command History returns a log and detail of all your dbt Cloud invocations."/>
163
163
164
164
-**Commit Changes modal —** The Commit Changes modal is accessible via the Git Actions button to commit all changes or via the Version Control Options menu to commit individual changes. Once you enter a commit message, you can use the modal to commit and sync the selected changes.
165
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/commit-changes-modal.png"width="100%"title="The Commit Changes modal is how users commit changes to their branch."/>
165
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/commit-changes-modal.png"width="90%"title="The Commit Changes modal is how users commit changes to their branch."/>
166
166
167
167
-**Change Branch modal —** The Change Branch modal allows users to switch git branches in the IDE. It can be accessed through the `Change Branch` link or the Git Actions button in the Version Control menu.
168
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/change-branch-modal.png"width="100%"title="The Commit Changes modal is how users change their branch."/>
168
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/change-branch-modal.png"width="90%"title="The Commit Changes modal is how users change their branch."/>
169
169
170
170
-**Revert Uncommitted Changes modal —** The Revert Uncommitted Changes modal is how users revert changes in the IDE. This is accessible via the `Revert File` option above the Version Control Options menu, or via the Git Actions button when there are saved, uncommitted changes in the IDE.
171
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/revert-uncommitted-changes-with-save.jpg"width="100%"title="The Commit Changes modal is how users change their branch."/>
171
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/revert-uncommitted-changes-with-save.jpg"width="90%"title="The Commit Changes modal is how users change their branch."/>
172
172
173
173
-**IDE Options menu —** The IDE Options menu can be accessed by clicking on the three-dot menu located at the bottom right corner of the IDE. This menu contains global options such as:
Copy file name to clipboardExpand all lines: website/docs/docs/cloud/dbt-cloud-ide/lint-format.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Linting doesn't support ephemeral models in dbt v1.5 and lower. Refer to the [FA
63
63
-**Fix** button — Automatically fixes linting errors in the **File editor**. When fixing is complete, you'll see a message confirming the outcome.
64
64
- Use the **Code Quality** tab to view and debug any code errors.
65
65
66
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-lint-format-console.gif"width="95%"title="Use the Lint or Fix button in the console section to lint or auto-fix your code."/>
66
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-lint-format-console.gif"width="90%"title="Use the Lint or Fix button in the console section to lint or auto-fix your code."/>
For more info on styling best practices, refer to [How we style our SQL](/best-practices/how-we-style/2-how-we-style-our-sql).
131
131
:::
132
132
133
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-sqlfluff-config.jpg"width="95%"title="Customize linting by configuring your own linting code rules, including dbtonic linting/styling."/>
133
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/ide-sqlfluff-config.jpg"width="90%"title="Customize linting by configuring your own linting code rules, including dbtonic linting/styling."/>
134
134
135
135
## Format
136
136
@@ -158,7 +158,7 @@ To enable sqlfmt:
158
158
6. Once you've selected the **sqlfmt** radio button, go to the console section (located below the **File editor**) to select the **Format** button.
159
159
7. The **Format** button auto-formats your code in the **File editor**. Once you've auto-formatted, you'll see a message confirming the outcome.
160
160
161
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/sqlfmt.gif"width="95%"title="Use sqlfmt to format your SQL code."/>
161
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/sqlfmt.gif"width="90%"title="Use sqlfmt to format your SQL code."/>
162
162
163
163
### Format YAML, Markdown, JSON
164
164
@@ -169,7 +169,7 @@ To format your YAML, Markdown, or JSON code, dbt Cloud integrates with [Prettier
169
169
3. In the console section (located below the **File editor**), select the **Format** button to auto-format your code in the **File editor**. Use the **Code Quality** tab to view code errors.
170
170
4. Once you've auto-formatted, you'll see a message confirming the outcome.
171
171
172
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/prettier.gif"width="95%"title="Format YAML, Markdown, and JSON files using Prettier."/>
172
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/prettier.gif"width="90%"title="Format YAML, Markdown, and JSON files using Prettier."/>
173
173
174
174
175
175
You can add a configuration file to customize formatting rules for YAML, Markdown, or JSON files using Prettier. The IDE looks for the configuration file based on an order of precedence. For example, it first checks for a "prettier" key in your `package.json` file.
@@ -185,7 +185,7 @@ To format your Python code, dbt Cloud integrates with [Black](https://black.read
185
185
3. In the console section (located below the **File editor**), select the **Format** button to auto-format your code in the **File editor**.
186
186
4. Once you've auto-formatted, you'll see a message confirming the outcome.
187
187
188
-
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/python-black.gif"width="95%"title="Format Python files using Black."/>
188
+
<Lightboxsrc="/img/docs/dbt-cloud/cloud-ide/python-black.gif"width="80%"title="Format Python files using Black."/>
0 commit comments