< Return to Video

Groups Overview - Google Web Designer

  • 0:00 - 0:04
  • 0:04 - 0:07
    LUCAS: My name is Lucas, and
    I'm an engineer on Google Web
  • 0:07 - 0:08
    Designer.
  • 0:08 - 0:11
    In this video, I will
    show how to use groups.
  • 0:11 - 0:14
    Groups are a way of
    encapsulating content
  • 0:14 - 0:16
    into reusable assets.
  • 0:16 - 0:18
    And to show what
    this means, I'm going
  • 0:18 - 0:20
    to start with a simple example.
  • 0:20 - 0:27
    I add an image to stage,
    and I add some text as well.
  • 0:27 - 0:35
    So I'll type in the text, and
    I will format it a little bit.
  • 0:35 - 0:39
    Maybe center it, make it bold.
  • 0:39 - 0:43
    Tweak the size of the
    text box a little bit.
  • 0:43 - 0:46
    OK, now I select both
    elements and I right
  • 0:46 - 0:48
    click and go to Create Group.
  • 0:48 - 0:49
    And I enter a name--
  • 0:49 - 0:51
    My Group.
  • 0:51 - 0:53
    Now, I see that in
    the Asset Library,
  • 0:53 - 0:57
    I have a new entry for that
    group and the elements on stage
  • 0:57 - 1:00
    have been replaced by an
    instance of this group.
  • 1:00 - 1:03
    I can add new instances
    by drag-and-dropping
  • 1:03 - 1:05
    from the Asset Library.
  • 1:05 - 1:07
    Each of these instances
    is a reference
  • 1:07 - 1:09
    to the group's
    contents, which means
  • 1:09 - 1:12
    that if I edit any one instance,
    the changes are reflected
  • 1:12 - 1:13
    in both.
  • 1:13 - 1:21
    So for example, I
    will change the text
  • 1:21 - 1:27
    and I will create a simple
    animation where I first
  • 1:27 - 1:32
    fade the text out to
    0 opacity, and then
  • 1:32 - 1:38
    I fade it back in to opacity 1.
  • 1:38 - 1:40
    And now if I play
    the animation, we
  • 1:40 - 1:44
    see that both instances
    are identical.
  • 1:44 - 1:46
    To see how this works
    behind the scenes,
  • 1:46 - 1:48
    we can switch to Code View.
  • 1:48 - 1:50
    So here in Code
    View, I see a block
  • 1:50 - 1:52
    that has all of my groups.
  • 1:52 - 1:53
    There's only one.
  • 1:53 - 1:56
    It has an image, and
    it has some text.
  • 1:56 - 2:00
    And then here in the main
    document are my two instances.
  • 2:00 - 2:03
    Each instance is an empty
    div that refers to the group
  • 2:03 - 2:04
    by name.
  • 2:04 - 2:06
    When you publish
    the document, we
  • 2:06 - 2:09
    inject the contents of the
    group into each instance--
  • 2:09 - 2:14
    so the instances are guaranteed
    to always be identical.
  • 2:14 - 2:16
    Groups can contain
    any content that you
  • 2:16 - 2:19
    can build in Google Web
    Designer, including instances
  • 2:19 - 2:21
    of other groups.
  • 2:21 - 2:24
    For example, here I'll
    add another instance.
  • 2:24 - 2:27
    Maybe I'll style it a bit
    differently by giving it
  • 2:27 - 2:33
    a border, and then I will
    add an additional element--
  • 2:33 - 2:35
    let's say, a div.
  • 2:35 - 2:39
    Now I select both and
    create another group.
  • 2:39 - 2:42
  • 2:42 - 2:45
    So as before, if I edit
    one of the instances,
  • 2:45 - 2:48
    then those changes are
    reflected in all instances--
  • 2:48 - 2:50
    regardless of where they appear.
  • 2:50 - 2:54
  • 2:54 - 2:56
    If I delete all the
    instances from stage,
  • 2:56 - 2:58
    then the groups themselves
    don't disappear.
  • 2:58 - 3:00
    They are still in
    the Asset Library,
  • 3:00 - 3:04
    and I can still add
    additional instances on stage.
  • 3:04 - 3:07
    If you want to delete a group
    entirely, in the Asset Library,
  • 3:07 - 3:10
    you can right-click on
    it and select Delete.
  • 3:10 - 3:13
    This context menu also
    gives a few other options.
  • 3:13 - 3:16
    For example, I can
    rename the group--
  • 3:16 - 3:18
    call it Teapot.
  • 3:18 - 3:20
    You can duplicate
    the group, which
  • 3:20 - 3:23
    creates a new group
    whose contents are
  • 3:23 - 3:25
    a clone of the original.
  • 3:25 - 3:29
    And finally, you can edit
    the group in a separate view.
  • 3:29 - 3:31
    This last option
    is useful if you
  • 3:31 - 3:33
    don't have any
    instances on stage,
  • 3:33 - 3:35
    or if the state is
    cluttered and you
  • 3:35 - 3:38
    want to just look at
    the group in isolation.
  • 3:38 - 3:42
    So I'll select that, and now
    I'll do some more editing.
  • 3:42 - 3:45
    In this case, I'll add a
    colored background to the group.
  • 3:45 - 3:50
    And I'll do that
    by drawing a div,
  • 3:50 - 3:52
    change its color a
    little bit, and then I
  • 3:52 - 3:55
    will send it to the back.
  • 3:55 - 3:57
    And once I'm done
    editing, I click
  • 3:57 - 4:01
    on the root of the breadcrumb,
    and now I'm back on stage.
  • 4:01 - 4:03
    I see the changes
    have been reflected
  • 4:03 - 4:04
    in all of my instances.
  • 4:04 - 4:09
    And if I add a new instance,
    it also has those same changes.
  • 4:09 - 4:11
    That completes this
    introduction to groups.
  • 4:11 - 4:14
    In the next video, I'll show
    how we can add interactivity
  • 4:14 - 4:16
    to groups by adding
    events to them.
  • 4:16 - 4:18
    Thank you for watching.
  • 4:18 - 4:20
Title:
Groups Overview - Google Web Designer
Description:

more » « less
Duration:
04:20

English subtitles

Revisions