Skip to content

Commit

Permalink
Deprecate TipBox (#2121)
Browse files Browse the repository at this point in the history
Both tip-box and box are supported with box being an alias for
tipbox.

This could be confusing for users and developers as the use of
tip-box is not documented.

Let's deprecate tipbox, remove support for the tip-box tag and
replace all instances of tipbox to box.

This prevents confusion between the use of variations of tipbox in
both code and documentation, making any reference to or use of this
this component consistent. Replacing tipbox with box removes the
need for box being an alias for tipbox, deprecating tipbox completely.
  • Loading branch information
itsyme committed Feb 6, 2023
1 parent 4e7a13a commit 56a3510
Show file tree
Hide file tree
Showing 14 changed files with 99 additions and 100 deletions.
2 changes: 1 addition & 1 deletion docs/devGuide/design/projectStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Some custom components and directives are also added for MarkBind's use.

* Thumbnail.vue

* TipBox.vue
* Box.vue

* **Custom directives ported from [MarkBind/vue-strap](https://github.com/MarkBind/vue-strap)**

Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ An example that uses GFMD syntax for task lists:
  </td>
  <td>&nbsp;&nbsp;</td>
  <td><br>
<tip-box>
<box>

**Things to do:**

- [x] Finish my changes
- [ ] Push my commits to GitHub
- [ ] Open a pull request

</tipbox>
</box>
  </td>
</tr>
</table>
Expand All @@ -73,11 +73,11 @@ Euler's Identity \(e^{i\pi}+1=0\) is a beautiful formula.
  </td>
  <td>&nbsp;&nbsp;</td>
  <td><br>
<tip-box>
<box>

Euler's Identity \(e^{i\pi}+1=0\) is a beautiful formula.

</tipbox>
</box>
  </td>
</tr>
</table>
Expand Down
16 changes: 8 additions & 8 deletions docs/userGuide/components/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,22 @@ You can define such a slot within the component by adding a `slot="slot_name"` a
Every component documented in our user guide allows you to insert your own defined CSS classes.
This is done by adding the `add-class` attribute to a component along with the desired class names.

<tip-box border-left-color="#00B0F0">
<box border-left-color="#00B0F0">
<i style="font-style: normal; font-weight: bold; color: dimgray">Example</i><br>
<tip-box type="info" add-class="lead font-italic text-center">
<box type="info" add-class="lead font-italic text-center">
Easily apply Bootstrap classes without using a wrapper!
</tip-box>
</tip-box>
</box>
</box>

<tip-box border-left-color="black">
<box border-left-color="black">
<i style="font-style: normal; font-weight: bold; color: dimgray">Markup</i>

```html
<tip-box type="info" add-class="lead font-italic text-center">
<box type="info" add-class="lead font-italic text-center">
Easily apply Bootstrap classes without using a wrapper!
</tip-box>
</box>
```
</tip-box>
</box>
<br>

{% from "njk/common.njk" import previous_next %}
Expand Down
6 changes: 3 additions & 3 deletions docs/userGuide/syntax/panels.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@
<panel header="Parent Panel">
<panel header="Level 1 Nested Panel">
<panel header="Level 2 Nested Panel">
<tip-box type="success">
I'm a nested tip-box
</tip-box>
<box type="success">
I'm a nested box
</box>
<panel header="Level 3 Nested Panel" type="minimal">
minimal-type panel
</panel>
Expand Down
4 changes: 2 additions & 2 deletions docs/userGuide/usingPlugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ MarkBind has a set of built-in plugins that can be used immediately without inst

### Adding External Plugins

<tip-box type="warning">
<box type="warning">

**WARNING:** Plugins are executable programs that can be written by anyone. This means that they might contain malicious code that may damage your computer.

Only run plugins from sources that you trust. Do not run the plugin if the source/origin of the plugin cannot be ascertained.
</tip-box>
</box>

Plugins come as `.js` files. To install an external plugin, simply put it in the `_markbind/plugins` folder. To use the plugin, update the `site.json` file the same way you did for built-in plugins.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,17 @@ <h1 id="heading-2"><span id="heading-2" class="anchor"></span>Heading 2<a class=
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</box>
<box type="tip"><template #header>
<p>Tip box heading</p>
<p>Box heading</p>
</template>
tip
</box>
<box type="success"><template #header>
<p>Tip box heading</p>
<p>Box heading</p>
</template>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</box>
<box type="important" dismissible><template #header>
<p>Tip box heading</p>
<p>Box heading</p>
</template>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</box>
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/src/html/MdAttributeRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class MdAttributeRenderer {
}

/*
* Tip boxes
* Boxes
*/

processBoxAttributes(node) {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/template/default/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ value2 | y | 20 | :far-thumbs-down:
<box type="warning" dismissible>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</box>
<box type="tip" header="Tip box heading">
<box type="tip" header="Box heading">
tip
</box>
<box type="success" header="Tip box heading">
<box type="success" header="Box heading">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</box>
<box type="important" dismissible header="Tip box heading">
<box type="important" dismissible header="Box heading">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</box>

Expand Down
File renamed without changes.
Loading

0 comments on commit 56a3510

Please sign in to comment.